随笔分类 -  software engineering / Rust

摘要:首先确保计算机安装好了Rust环境 验证Rust安装:rustc --version 验证Cargo安装:cargo --version 然后安装tauri-cli包(用以构建Tauri 框架的应用程序),cargo install tauri-cli 安装完成后,使用tauri-cli来写一个GU 阅读全文
posted @ 2024-08-10 16:30 Ashe|||^_^ 阅读(540) 评论(0) 推荐(0)
摘要:First, let’s take a look at the ownership rules. Keep these rules in mind as we through the examples that illustrate them: Each value in Rust has an o 阅读全文
posted @ 2024-04-23 18:06 Ashe|||^_^ 阅读(39) 评论(0) 推荐(0)
摘要:Many programming languages don’t require you to think about the stack and the heap very often. 许多编程语言并不会要求你经常思考堆栈。But in a system programming language 阅读全文
posted @ 2024-04-21 19:33 Ashe|||^_^ 阅读(59) 评论(0) 推荐(0)
摘要:在Rust中常用于流程控制的代码就是if expressions & loops if expressions if expressions以关键字if开始,后面跟一个条件(布尔类型)。Optionally,we can also include an else expression, which 阅读全文
posted @ 2024-04-12 15:49 Ashe|||^_^ 阅读(47) 评论(0) 推荐(0)
摘要:Functions are prevalent in Rust code. You’ve already seen one of the most important functions in the language: the main function, which is the entry p 阅读全文
posted @ 2024-04-10 17:48 Ashe|||^_^ 阅读(54) 评论(0) 推荐(0)
摘要:Every value in Rust is of a certain data type, which tells Rust what kind of data is being specified so it knows how to work with that data. We’ll loo 阅读全文
posted @ 2024-04-08 16:44 Ashe|||^_^ 阅读(62) 评论(0) 推荐(0)
摘要:Cargo 是 Rust 语言的包管理器和构建工具。 它可以帮助您管理依赖项、构建项目、运行测试和发布程序等。 在 Rust 社区中,Cargo 已经成为了标准的构建工具,它为 Rust 的开发者提供了极大的便利。 Cargo 的主要功能包括: 管理依赖项:Cargo 可以帮助您下载和安装 Rust 阅读全文
posted @ 2024-04-07 16:40 Ashe|||^_^ 阅读(97) 评论(0) 推荐(0)
摘要:let mut guess = String::new(); 在Rust中,一般使用let关键字keyword声明变量,比如 let apples = 5; 这行代码声明了一个名为apples的变量,并绑定其变量值为5,在Rust中变量默认是不可变的immutable。意味着一旦给变量赋值后,其值不 阅读全文
posted @ 2024-04-03 14:21 Ashe|||^_^ 阅读(81) 评论(0) 推荐(0)
摘要:下载rustup rustup是 Rust 的安装程序,也是它的版本管理程序,因此安装好环境后慎重卸载。 https://www.rust-lang.org/zh-CN/tools/install 运行rustup-init.exe 键入3回车安装,会发生Rust代码无法运行,因此建议Windows 阅读全文
posted @ 2024-01-21 16:44 Ashe|||^_^ 阅读(113) 评论(0) 推荐(0)