摘要:
环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/cargo/deps.html 示例 rust 的依赖管理可以使用 cargo,只需要在 Cargo.toml 中申明需要的依赖就行 阅读全文
posted @ 2021-12-06 10:13
jiangbo4444
阅读(898)
评论(0)
推荐(0)
摘要:
环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/crates/using_lib.html 示例 要链接到指定的库,可以通过 --extern 参数来指定。 rustc 链接库 f 阅读全文
posted @ 2021-12-06 10:11
jiangbo4444
阅读(545)
评论(0)
推荐(0)
摘要:
环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/crates/lib.html 示例 create 是 rust 中的一个编译单元,和其它语言的库的概念类似。模块并不会单独编译,只 阅读全文
posted @ 2021-12-06 10:10
jiangbo4444
阅读(669)
评论(0)
推荐(0)
摘要:
环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/mod/split.html 示例 将所有的代码写到同一个文件太多的时候,可以考虑分别写到不同的文件中,文件层级如下: $ tree 阅读全文
posted @ 2021-12-06 10:02
jiangbo4444
阅读(366)
评论(0)
推荐(1)