Rust 程序设计语言 简体中文版 1.85.0下,输入下面的命令来构建项目: $ cargo build Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo) Finished dev [unoptimized + debuginfo] target(s) in 2.85 secs 这个命令会创建一个可执行文件 target/debug/hello_cargo (在 Windows /target/debug/hello_cargo 运行了程序,也 可以使用 cargo run 在一个命令中同时编译并运行生成的可执行文件: $ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs Running `target/debug/hello_cargo` Hello, world 会在运行之前重新构建项目,并会出现像这样的输出: $ cargo run Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo) Finished dev [unoptimized + debuginfo] target(s) in 0.33 secs Running `target/debug/hello_cargo` Hello, world0 码力 | 562 页 | 3.23 MB | 26 天前3
共 1 条
- 1













