1.创建项目 : 如创建hello_world
cargo new 项目名
2.构建
cargo bubild
以下命令为发布而构建,会对代码进行优化
cargo build --release
3.编译并运行
cargo run
效果如下:
1.创建项目 : 如创建hello_world
cargo new 项目名
2.构建
cargo bubild
以下命令为发布而构建,会对代码进行优化
cargo build --release
3.编译并运行
cargo run
效果如下: