助教
提供了两个板条箱以帮助更好地使用protobuf:
prost-serde:帮助您使用prost和protobuf文件生成与Serde兼容的代码。 更多。
prost-helper:促进prost的宏和函数。 更多。
在货运项目中使用prost-helper
首先,将prost-serde和prost-serde prost-helper到您的Cargo.toml :
[dependencies]
prost-helper = "0.1"
[build-dependencies]
prost-serde = "0.1"
然后将复制到您的项目并对其进行自定义。 在查看更多信息。 然后可以在build.rs中添加它:
fn main () {
let json = include_str! ( "path/to/your/build_config.json" );
相关下载链接:
//download.csdn.net/download/weixin_42104778/15421068?utm_source=bbsseo