#cargo-toml #sdk #智眼rust

libzymod-rust

智眼Rust SDK

13 stable releases

2.0.4 Dec 30, 2021
2.0.3 Dec 28, 2021
1.0.7 Dec 14, 2021

#687 in Machine learning

38 downloads per month

MIT/Apache

13KB
269 lines

libzymod-rust

Crate

智眼模块Rust SDK

安装

从Create.io安装

Cargo.toml 依赖项内添加:

[dependencies]
libzymod-rust = "x.x.x"

本地实时开发

SDK上传至Creates.io后,想要实时更新必须使用Creates默认源,如果想要本地实时开发/测试代码,需要做以下设置

克隆源代码

git clone 
cd libzymod-rust

在要使用SDK项目的上级目录新建一个Cargo.toml文件

cat >> /home/xxxx/workspace/ZhiYanModule/Cargo.toml << EOF
[workspace]
members = [
    "zhiyan-mod-xxx",
]

[patch.crates-io]
libzymod-rust = { path = '/home/xxxx/ZhiYan/libzymod-rust' }
EOF

最终 Cargo.toml 文件内容

[workspace]
members = [
    "zhiyan-mod-xxx",
]

[patch.crates-io]
libzymod-rust = { path = '/home/xxxx/ZhiYan/libzymod-rust' }

在项目中直接更新即可

cargo build

使用

在文件中添加:

extern crate zymod;

Dependencies

~11–20MB
~276K SLoC