mirror of
https://gitee.com/openharmony/commonlibrary_rust_ylong_json
synced 2024-11-27 09:20:37 +00:00
!10 【ylong_json】构建方式修正 && OAT.xml 屏蔽 png 文件
Merge pull request !10 from 王柄涵/master
This commit is contained in:
commit
9a04a31a52
@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "ylong_json"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
description = "A JSON serialization file format"
|
||||
#readme = "README.md"
|
||||
license = "Apache-2.0"
|
||||
repository = "https://open.codehub.huawei.com/innersource/Ylong_Rust/ylong_rs/files?ref=master&filePath=src%2Flib%2Fparser%2Fylong_json"
|
||||
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
|
||||
|
2
OAT.xml
2
OAT.xml
@ -58,7 +58,7 @@ Note:If the text contains special characters, please escape them according to th
|
||||
<oatconfig>
|
||||
<filefilterlist>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
|
||||
<filteritem type="filename" name=".*.pem" desc="Testing of API for HTTPS configuration certificates requires a certificate input"/>
|
||||
<filteritem typr="filename" name=".*.png" desc="png for json"/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
<filteritem type="filename" name=".*.toml" desc="toml treats as readme file"/>
|
||||
|
25
README.md
25
README.md
@ -48,17 +48,24 @@ ylong_json
|
||||
```
|
||||
|
||||
## Build
|
||||
`GN` is supported. User should add dependencies in `deps` of `BUILD.GN` to build this crate.
|
||||
|
||||
```gn
|
||||
deps += ["//commonlibrary/rust/ylong_json:lib"]
|
||||
```
|
||||
|
||||
`Cargo` is supported. User should add dependencies in ```Cargo.toml``` to build this crate.
|
||||
|
||||
### Use Cargo
|
||||
1. Add `ylong_json` to the dependency of `Cargo.toml`
|
||||
```toml
|
||||
[dependencies]
|
||||
ylong_json = { path = "/commonlibrary/rust/ylong_json" } # Uses path dependencies.
|
||||
ylong_json = { git = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json.git" }
|
||||
```
|
||||
|
||||
### Use gn
|
||||
1. Add `ylong_json` in `bundle.json`
|
||||
```gn
|
||||
“deps”: {
|
||||
“components”: ["ylong_json"]
|
||||
}
|
||||
```
|
||||
|
||||
2. Add `ylong_json:lib` in `BUILD.gn`
|
||||
```gn
|
||||
external_deps = ["ylong_json:lib"]
|
||||
```
|
||||
|
||||
## User Guide
|
||||
|
24
README_zh.md
24
README_zh.md
@ -48,17 +48,25 @@ ylong_json
|
||||
```
|
||||
|
||||
## 编译构建
|
||||
若使用 GN 编译工具链, 在 BUILD.GN 的 deps 段下添加依赖。添加后使用 GN 进行编译和构建:
|
||||
|
||||
```gn
|
||||
deps += ["//commonlibrary/rust/ylong_json:lib"]
|
||||
```
|
||||
|
||||
若使用 Cargo 编译工具链, 在 ```Cargo.toml``` 下添加依赖。添加后使用 ```cargo``` 进行编译和构建:
|
||||
|
||||
### 使用 Cargo 编译
|
||||
1. 在 `Cargo.toml` 的依赖中添加 `ylong_json`
|
||||
```toml
|
||||
[dependencies]
|
||||
ylong_json = { path = "/commonlibrary/rust/ylong_json" } # 请使用路径依赖
|
||||
ylong_json = { git = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json.git" }
|
||||
```
|
||||
|
||||
### 使用 GN 编译
|
||||
1. 在 `bundle.json` 中添加 `ylong_json`
|
||||
```gn
|
||||
“deps”: {
|
||||
“components”: ["ylong_json"]
|
||||
}
|
||||
```
|
||||
|
||||
2. 在 `BUILD.gn` 中添加 `ylong_json:lib`
|
||||
```gn
|
||||
external_deps = ["ylong_json:lib"]
|
||||
```
|
||||
|
||||
## 用户指南
|
||||
|
Loading…
Reference in New Issue
Block a user