简单跑起来

1
2
3
fn main() {
println!("hi, hello")
}

rustc main.rs 编译

使用cargo创建项目

1
cargo new mypro
1
2
3
4
5
fn main() {
let myname = "cwz";
println!("{}", myname);
}