# code-rust **Repository Path**: codedesign-fun/code-rust ## Basic Information - **Project Name**: code-rust - **Description**: rust示例代码 - **Primary Language**: Rust - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-07 - **Last Updated**: 2024-01-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 搭建环境 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 国外地址网络不好可以开启vpn访问 添加命令行 source $HOME/.cargo/env cargo --version cargo build cargo run cargo doc cargo test cargo publish 开发手册:https://doc.rust-lang.org/rustc/what-is-rustc.html cargo build --verbose ### 开发脚本 编译脚本 rustc hello.rs 运行脚本 ./hello 直接编译有导入包的rs文件 rustc main.rs ### 应用开发 菜鸟教程开始: https://www.runoob.com/rust/cargo-tutorial.html 创建工程文件 cargo new greeting cargo run 开发web应用 rocket框架 git clone https://github.com/SergioBenitez/Rocket cd Rocket git checkout v0.5-rc cd examples/hello cargo run