From 76c2cae06754741b0ed2704c094f293c5a2dc8df Mon Sep 17 00:00:00 2001 From: luming Date: Fri, 15 Nov 2024 10:43:38 +0800 Subject: [PATCH] [Feature] Third party rust crate add bundle.json Signed-off-by: luming --- BUILD.gn | 10 ++++++---- bundle.json | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 bundle.json diff --git a/BUILD.gn b/BUILD.gn index 21ce2e47..07c4d656 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -24,10 +24,10 @@ ohos_cargo_crate("lib") { cargo_pkg_authors = "David Tolnay " cargo_pkg_name = "syn" cargo_pkg_description = "Parser for Rust source code" - deps = [ - "//third_party/rust/crates/proc-macro2:lib", - "//third_party/rust/crates/quote:lib", - "//third_party/rust/crates/unicode-ident:lib", + external_deps = [ + "rust_proc_macro2:lib", + "rust_quote:lib", + "rust_unicode_ident:lib", ] features = [ "clone-impls", @@ -43,4 +43,6 @@ ohos_cargo_crate("lib") { ] build_root = "build.rs" build_sources = [ "build.rs" ] + part_name = "rust_syn" + subsystem_name = "thirdparty" } diff --git a/bundle.json b/bundle.json new file mode 100644 index 00000000..014c9e4c --- /dev/null +++ b/bundle.json @@ -0,0 +1,35 @@ +{ + "name": "@ohos/rust_syn", + "description": "Parser for Rust source code", + "version": "5.0", + "license": "Apache License 2.0", + "publishAs": "code-segment", + "segment": { + "destPath": "third_party/rust/crates/syn" + }, + "dirs": {}, + "scripts": {}, + "component": { + "name": "rust_syn", + "subsystem": "thirdparty", + "adapted_system_type": [ + "standard" + ], + "deps": { + "components": [ + "rust_proc_macro2", + "rust_quote", + "rust_unicode_ident" + ] + }, + "build": { + "sub_component": [], + "inner_kits": [ + { + "name": "//third_party/rust/crates/syn:lib" + } + ], + "test": [] + } + } + } \ No newline at end of file -- Gitee