Rust语言

       Rust语言是一门系统编程语言,专注于安全。Rust语言系统设计于保证内存安全,它在安全代码里不允许空指针,悬垂指针和数据竞争。2015年发布第一版

https://kaisery.github.io/trpl-zh-cn/

安装

参考:https://blog.csdn.net/weixin_43882409/article/details/87616268?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-1

https://blog.csdn.net/weixin_40411915/article/details/100109793

安装完成

第一个程序

// This is the main function
fn main() {
   // The statements here will be executed when the compiled binary is called
   // Print text to the console
    println!("Hello World!");
}

rustc编译后生成exe程序

使用cargo创建rust项目

cargo new + 文件名

 编译运行

cargo run

编译

cargo build

发布了441 篇原创文章 · 获赞 188 · 访问量 19万+

猜你喜欢

转载自blog.csdn.net/hxxjxw/article/details/105317065
今日推荐