# rust_projects **Repository Path**: paulzlb/rust_projects ## Basic Information - **Project Name**: rust_projects - **Description**: rust learning - **Primary Language**: Rust - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-06 - **Last Updated**: 2023-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # rust_projects #### 介绍 rust learning #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) Rust包/crate、库/模块 Rust里面存在包,库,模块,crate等说法,且都有对应实体。应该说Rust里面,用cargo new 生成的就是包,一个包里有多个目录,一个目录看成一个crate,当这个crate编译后,可能是一个二进制可执行文件,也可能是一个供其他函数调用的库。一个crate里面,往往有很多.rs文将,这些文件称为模块(mod),使用这些文件或模块需要用use。 package --> crates (dirs) 一个包存在多个crate(dir) crate --> modules (lib/EFL) 一个crate包含多个模块(mod),其crate可编译成库或可执行文件 module --> file.rs (file) 一个模块就是一个.rs文件 package <-- 包 ├── Cargo.toml ├── src <-- crate │ ├── main.rs <-- 模块,主模块 │ ├── lib.rs <-- 模块,库模块(可编译成库或可执行文件) │ └── math <-- 模块,数学函数模块math │ ├─ mod.rs <-- 模块,为math模块引入add和sub模块中函数 │ ├─ add.rs <-- 模块,实现数学函数模块的add函数 │ └─ sub.rs <-- 模块,实现数学函数模块的sub函数 └── file <-- crate ├── core <-- 模块,文件操作模块 └── clear <-- 模块,清理模块 Rust标准库如下: alloc hint mem any i8 ptr array i16 rc ascii i32 result borrow i64 slice boxed i128 str cell io string char isize sync clone iter task cmp marker thread collections net time convert num u8 default ops u16 env option u32 error os u64 f32 panic u128 f64 path usize ffi pin vec fmt prelude backtrace fs primitive intrinsics future process lazy hash raw