ysMaster (http://sysmaster.online)
Process 1 is at a critical position in the system, responsible for system initialization and runtime service management, and is currently facing the following challenges:
Industry demands
Overall strategy: Focus on the system with the smallest function, adopt the parallel strategy of core self-developed and non-core community solutions, and the strategy of drawer replacement of independent components to achieve systemd self-developed substitution
Scenario-by-scenario: Combine different usage scenarios to split the systemd function into multiple layers, and gradually complete the function development, verification, and replacement according to the scenario from easy to difficult.
Multi-solution: The core functions and components of the non-community alternative are replaced by self-developed and rewritten, and the others are replaced by community software without supply risk.
Rhythmic: one core competitiveness a year, to 24 years to complete the exploration of three corecompetitiveness, according to the development - landing - substitution of the three lines of work.
sysMaster aims to improve the traditional init daemon, 1+1+N architecture.
init: The new No. 1 process, with minimalist functions, 1,000 lines of code, and extreme reliability
core: undertakes the original core functions of systemd, introduces a reliability framework and plug-in mechanism, and makes it capable of rapid self-healing of crashes, hot upgrades, and flexible assembly
exts: makes the functions of each component of the original coupling independent, supports the replacement of the corresponding components of the systemd in a drawer style, and supports rhythmic substitution of sub-scenes
Strive to build three major competitiveness:
First, download the repository code and run the command to pre-install the project dependencies and build the development environment, the project is mainly built on Rust 1.57, and use pre-commit to do the git commit check.
sh ./build.sh
Second, the program can be built through the scripts provided. You can also refer to Action Building .pre-commit-config.yaml in .
sh ci/01-pre-commit.sh
# 格式检查
cargo clippy -vvv --all-targets --features "default" --all -- -Dwarnings
# 构建
cargo build --all --features "default" -v
# 测试
RUST_BACKTRACE=full cargo test --all-targets --all -v -- --nocapture --show-output --test-threads=1
For more information about how to use it in various scenarios,please refer to the tools directory.
ls tools
You can also visit, sysmaster.online the official website for examples
The source code repository is managed in the form of workspaces, each directory is a package, each package contains a crate (lib or bin form), the public lib crate directory is prefixed with lib, created with cargo new --lib libtests, and the bin crate directory of daemon type ends with d.
/ (sysmaster)
|...init (init进程)
|...factory (系统配置)
|...libs (对外接口)
| |...libtests (test lib crate)
| |...cgroup (cgroup lib crate)
| |...cmdproto(cmd proto lib crate)
|...exts (sysmaster-extends组件)
| |...devmaster (daemon)
| |...random-seed (bin)
|...core (sysmaster-core核心组件)
| |...sysmaster (bin)
| |...libcore (internal lib)
| |...sctl (sysmaster cli)
| |...coms (插件)
| |...service (unit type crate)
| |...socket (unit type crate)
| |...target (unit type crate)
|...tools
| |...musl_build
| |...run_with_sd
|...docs (sysmaster.online)
|...build.sh (准备环境)
As:
- lib crate: libs/event, libs/basic
- bin crate: extends/init, sysmaster
- daemon crate: extends/udevd, extends/logind
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。