# mulit_project **Repository Path**: wushuangcoder/mulit_project ## Basic Information - **Project Name**: mulit_project - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-04 - **Last Updated**: 2025-01-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mulit_project #### 介绍 这是一个多模块项目,包含多个子模块,每个子模块都有自己的功能,并且可以单独运行。 #### 项目架构 ``` ├── Cargo.toml # 项目根级的Cargo.toml文件 ├── LICENSE # 项目 的LICENSE 文件,比如Apache2.0 ├── README.md # 项目说明 README文件 ├── benches # 压测代码所在目录 ├── bin # 项目启动命令存放的目录 ├── build.rs # cargo中的构建脚本 build.rs。可参考这个文档:https://course.rs/cargo/reference/build-script/intro.html ├── config # 存放配置文件的目录 ├── docs # 存放技术文档的目录 ├── example # 存放项目调用 Demo 的项目 ├── makefile # 用于编译打包项目的makefile文件 ├── src # 源代码目录 │ ├── cmd │ │ ├── Cargo.toml │ │ ├── src │ │ │ └── placement-center │ │ │ └── server.rs │ │ └── tests │ │ └── test.rs │ ├── placement-center │ │ ├── Cargo.toml │ │ ├── src │ │ │ └── lib.rs │ │ └── tests │ │ └── test.rs │ └── protocol │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── tests │ └── test.rs ├── tests # 存放测试用例代码的文件 └── version.ini # 记录版本信息的文件 ``` - 根目录 cargo.toml ```toml [workspace] members = [ "src/common/base", "src/placement-center", "src/cmd", "src/protocol", ] resolver = "2" [workspace.package] version = "0.0.1" edition = "2021" license = "Apache-2.0" [workspace.dependencies] serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" ## workspaces members placement-center = { path = "src/placement-center" } cmd = { path = "src/cmd" } protocol = { path = "src/protocol" } common-base = { path = "src/common/base" } ``` - bin子目录 cargo.toml ```toml [package] name = "cmd" version.workspace = true edition.workspace = true license.workspace = true [dependencies] [[bin]] name = "placement-center" path = "src/placement-center/server.rs" ``` - lib子目录 cargo.toml ```toml [package] name = "placement-center" version.workspace = true edition.workspace = true license.workspace = true [dependencies] ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md