commonlibrary_rust_ylong_json/Cargo.toml
王柄涵 7cca8f931e 【ylong_json】构建方式修正 && OAT.xml 修改
Signed-off-by: 王柄涵 <wangbinghan1@huawei.com>
2023-08-29 10:14:07 +08:00

42 lines
1.9 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "ylong_json"
version = "1.0.0"
edition = "2021"
description = "A JSON serialization file format"
#readme = "README.md"
license = "Apache-2.0"
repository = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json"
keywords = ["ylong", "json", "serialization", "deserialization"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "ylong_json"
crate-type = ["cdylib", "staticlib", "lib"]
[features]
default = ["btree_object", "vec_array"] # Object 默认使用 Btree 结构Array 默认使用 Vec 结构。
c_adapter = ["libc"] # 使用 C 封装层接口
list_array = [] # Array 底层使用 LinkedList。在 Array 的平均子节点数较少(约小于 15 个)、查找数量较少时,性能较好。
vec_array = [] # Array 底层使用 Vec。在 Array 的平均子节点数较多(约大于 15 个)、查找数量较多时,性能较好。
list_object = [] # Object 底层使用 LinkedList。在 Object 的平均子节点数较少(约小于 15 个)、查找数量较少时,性能较好。
vec_object = [] # Object 底层使用 Vec。在 Object 的平均子节点数中等(约大于 15 个,小于 1024 个)、查找数量较少时,性能较好。
btree_object = [] # Object 底层使用 Btree。在 Object 的平均子节点数较多(约大于 1024 个)、查找数量较多时,性能较好。
ascii_only = [] # 仅使用 ASCII 字符,正常解析 unicode 字符,但超出 ASCII 的 UTF-8 字符在输出时保持不变。
[dependencies]
libc = { version = "0.2.134", optional = true }
serde = { version = "1.0.136", features = ["derive"] }
[dev-dependencies]
serde_json = "1.0.74"
[[test]]
name = "sdv_adapter_test"
path = "./tests/sdv_adapter_test.rs"
required-features = ["c_adapter"]
[[test]]
name = "ylong_json_sdv_test"
path = "./tests/ylong_json_sdv_test.rs"
required-features = []