智眼模块Rust SDK
在 Cargo.toml
依赖项内添加:
toml
[dependencies]
libzymod-rust = "x.x.x"
SDK上传至Creates.io后,想要实时更新必须使用Creates默认源,如果想要本地实时开发/测试代码,需要做以下设置
1.克隆源代码
git clone
cd libzymod-rust
2.在要使用SDK项目的上级目录新建一个Cargo.toml
文件:
touch ../Cargo.toml
3.编辑Cargo.toml
vim ../Cargo.toml
4.填入一下内容:
``` [workspace]
members = [ "XXX",//需要实时更新SDK的项目名称 ]
[patch.crates-io] libzymod-rust = { path = '../../../libzymod-rust' }//SDK所在的绝对路径 ```
5.在项目中直接更新即可:
cargo build
在文件中添加:
extern crate zymod;