Some checks are pending
CI — CoM Config Validation / Validate JSON Configs (push) Waiting to run
CI — CoM Config Validation / Validate YAML Configs (push) Waiting to run
CI — CoM Config Validation / Lint Shell Scripts (push) Waiting to run
CI — CoM Config Validation / Secret Detection (push) Waiting to run
CI — CoM Config Validation / Lint Markdown (push) Waiting to run
CI — CoM Config Validation / Validate CODEOWNERS (push) Waiting to run
Public, sanitized mirror of an AI orchestration command center: agents, skills, MCP servers, slash-command workflows. All infrastructure identifiers, hostnames, mesh IPs/subnets, repo paths, maintainer identity, and hardware fleet specifics scrubbed to <placeholders>; session debug logs and host-specific memory removed. No live credentials. Verified clean by automated leak sweep. See SANITIZATION.md. churchofmalware.org . authorized research only
2.9 KiB
2.9 KiB
| applyTo |
|---|
| **/*.rs,**/Cargo.toml,**/Cargo.lock |
Rust Instructions — Syn_OS Development
Project Context
Syn_OS is a sovereign AI-assisted Cognitive Hyper-OS built on Arch Linux.
Current state: v21 "First Breath" — 92 crates, custom kernel modules, GRIMOIRE gamified training system.
Repo path on : <repo-path> Lib\stuff\Development\Syn_OS{Master Repo}
Rust Edition and Toolchain
- Rust 2021 edition
- Stable toolchain preferred, nightly only for documented features
- Target:
x86_64-unknown-linux-gnu(primary), cross-compile configs for ARCANUM nodes
Code Style
- Run
cargo fmtbefore every commit — no exceptions - Enable
clippy::pedanticin all crates - Prefer
thiserrorfor library errors,anyhowfor binary/CLI errors - Use
tracingoverlogfor structured logging - Prefer
tokiofor async runtime (single-threaded where possible to conserve resources)
Safety Rules
- No
unsafeblocks without:- A documented justification comment explaining why safe alternatives are insufficient
- An Aegis (SAST agent) audit pass
- A
// SAFETY:comment block per Rust convention
- Minimize FFI surface area — wrap all C interop in safe abstractions
- Use
cargo denyfor license and vulnerability audits on all dependencies - Use
cargo auditin CI for known vulnerability detection
Performance Constraints
- has RAM and — be memory-conscious
- Prefer
cargo checkovercargo buildduring development iteration - Use incremental compilation (default, but don't disable it)
- Profile before optimizing — use
cargo flamegraphfor hot path analysis - Avoid unnecessary allocations in hot paths — prefer stack allocation and borrowing
Crate Organization
- Each crate must have a clear single responsibility documented in its Cargo.toml description
- Workspace-level dependency management via
[workspace.dependencies] - Feature flags for optional functionality — don't compile what you don't need
- Internal crates use path dependencies, external crates use version pinning
Testing
- Unit tests in the same file (
#[cfg(test)]module) - Integration tests in
tests/directory - Use
proptestorquickcheckfor property-based testing on parsers and data structures - Minimum code coverage target: 60% for new crates, improving over time
- Vanguard (QA agent) runs test suites as part of the /audit pipeline
Documentation
- All public items must have doc comments (
///) - Include
# Examplessection in doc comments for non-trivial functions - Run
cargo doc --no-depsto verify documentation builds cleanly - README.md in each crate root with architecture overview
Dependency Policy
- Audit all new dependencies with
cargo deny checkbefore adding - Prefer crates with: >1000 downloads, active maintenance, permissive license (MIT/Apache-2.0)
- Document the reason for each dependency in Cargo.toml comments
- No pre-1.0 crates in critical paths without stability justification