1.2
rustc main.rs 编译代码
file main 查看结果
main: Mach-O 64-bit executable arm64
std::process::exit(0);
签名: pub fn exit(code: i32) -> ! 是个发散函数
说明: Terminates(终止) the current process with the specified(指定的) exit code.
std::process.abort(); / id();
1.3
".toml"配置文件
cargo入门命令: run / check / --quite静默的
cargo help command 查看命令用法帮助
cargo.lock cargo.toml
执行cargo run 报错:
`cargo run` could not determine which binary to run. Use the `--bin` option to specify a binary, or the `default-run` manifest key.
available binaries: false, hello, true
需要指定默认执行入口
default-run = "hello"
Rust库被称为"crates" "主版本.副版本.补丁形式"
1.4
关于集成测试: src同级目录tests
src / target / tests
#[test]标记测试函数, assert!宏断言表达式
初识: use std::process::Command;
A process builder, providing fine-grained control over how a new process should be spawned.
进程生成器, 细粒度的创建控制
初次用例测试:

添加项目依赖: assert_cmd = "1"
再Cargo的bin目录中找到依赖的文件,