From 355942e86f4d65d0788d04385ebb2ee60e73de7d Mon Sep 17 00:00:00 2001 From: near330i Date: Tue, 18 Jul 2023 09:31:50 +0800 Subject: [PATCH] =?UTF-8?q?ylong=5Fhttp=20GN=E6=96=87=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: near330i --- bundle.json | 14 +++++++++----- ylong_http/BUILD.gn | 20 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/bundle.json b/bundle.json index f58c168..fbeb1f2 100644 --- a/bundle.json +++ b/bundle.json @@ -20,21 +20,25 @@ "rom": "100KB", "ram": "~200KB", "deps": { - "third_party": [ - "openssl", - "ylong_runtime" - ] + "third_party": ["openssl", "ylong_runtime"] }, "build": { "sub_component": [], "inner_kits": [ + { + "header": { + "header_base": [], + "header_files": [] + }, + "name": "//commonlibrary/rust/ylong_http/ylong_http:lib" + }, { "header": { "header_base": [], "header_files": [] }, "name": "//commonlibrary/rust/ylong_http/ylong_http_client:ylong_http_client_inner" - }, + }, { "header": { "header_base": [], diff --git a/ylong_http/BUILD.gn b/ylong_http/BUILD.gn index 0fb5f92..8cc53ce 100644 --- a/ylong_http/BUILD.gn +++ b/ylong_http/BUILD.gn @@ -12,10 +12,11 @@ # limitations under the License. import("//build/ohos.gni") +import("//build/test.gni") -ohos_rust_static_library("lib") { +ohos_rust_shared_library("lib") { crate_name = "ylong_http" - crate_type = "rlib" + crate_type = "dylib" crate_root = "src/lib.rs" subsystem_name = "commonlibrary" @@ -29,3 +30,18 @@ ohos_rust_static_library("lib") { "tokio_base", ] } + + +ohos_rust_unittest("rust_ylong_http_unit_test") { + module_out_path = "commonlibrary/rust/ylong_http" + sources = [ "src/lib.rs" ] + deps = [ "//third_party/rust/crates/tokio/tokio:lib" ] + clippy_lints = "none" + + rustflags = [ + "--cfg=feature=\"default\"", + "--cfg=feature=\"http1_1\"", + "--cfg=feature=\"http2\"", + "--cfg=feature=\"huffman\"", + ] +} \ No newline at end of file -- Gitee