A minimalist command-line utility written in Rust for bootstrapping C development environments with pre-configured build scripts and automatic Language Server Protocol (LSP) resolution.
<project_name>/
├── .clangd # Language server configuration with host-detected resource paths
├── .gitignore # Source control exclusions
├── README.md # Initial project documentation
├── build.sh # POSIX-compliant automated compilation script
├── include/ # Header file interface directory (.h)
└── src/ # Implementation source directory (.c)
Horos generates zero-dependency, structured environments optimized for specific compilation targets. It completely bypasses complex build system generators, relying instead on clean directory separation and direct compiler invocations via POSIX shell scripts.
Engineered for general-purpose applications, CLI tools, and system libraries.
- Standard: C11
- Compiler Execution:
clang - Compilation Flags:
-O2 -Wall -Wextra
Configured for WebAssembly (Wasm) compilation layers.
- Toolchain Integration: Emscripten (
emcc) - Compilation Model: Freestanding module architecture generated without a default
mainentry point, optimized specifically for exported function interfaces.
An unconstrained, freestanding environment engineered for bare-metal, OS kernel, bootloader, or low-level firmware development.
- Compilation Flags:
-ffreestanding -nostdlib -nostdinc - Runtime Bounds: Standard
libcis entirely excluded; provides a clean slate for custom memory layouts and runtime implementations.
To ensure immediate, out-of-the-box code navigation and diagnostics without manual configuration, Horos actively inspects the host system during execution:
- It queries the local compiler layer using
clang -print-resource-dirto locate the exact host resource directory. - It dynamically injects these absolute paths into the generated
.clangdfile. - This allows any LSP-compliant editor (e.g., Vim, Neovim, VS Code) to resolve system-level headers accurately, even when operating inside isolated, containerized, or cross-compilation environments.
- Path Traversal Protection: The generator strictly rejects project names containing absolute paths or parent directory navigation components (
..). - Shell Infiltration Defense: Inputs are strictly sanitized against shell-sensitive characters (
;,&,|,$, ```), eliminating potential command injection vectors inside the generated POSIXbuild.sh.
- Buffer Allocation: String buffers are pre-allocated to size during template generation to minimize heap reallocations.
- Filesystem Caching:
PathBufcomponents are cached and evaluated deterministically to minimize redundant I/O filesystem joining operations.
# From Crates.io
cargo install horos
# From Source
git clone https://github.com/KirikaeLabs/horos
cd horos
cargo install --path .
horos <PROJECT_NAME> [OPTIONS]
| Option | Short | Description |
|---|---|---|
--type <TYPE> |
-t |
Selects target template: native (default), web, or kernel |
--force |
Forces execution by overwriting the target directory if it exists | |
--dry-run |
Outputs planned filesystem operations to stdout without execution |
# Initialize a standard C11 environment
horos system_tool
# Initialize a WebAssembly compilation environment
horos web_module --type web
# Initialize a freestanding bare-metal environment
horos custom_kernel --type kernel
- Implementation Language: Rust (100%)
- License: MIT License
- Repository: github.com/KirikaeLabs/horos