Developer Guide
Building from Source
Setup your local Rust development environment and compile Black Sparrow.
Black Sparrow is written in standard Rust (2021 edition) and uses a 2-member Cargo workspace.
Prerequisites
- Rust Toolchain: Rust 1.80 or later (rustup.rs).
- C Compiler & System Libraries:
- Ubuntu / Debian:
sudo apt update && sudo apt install build-essential pkg-config libssl-dev - Fedora / RHEL:
sudo dnf groupinstall "Development Tools" && sudo dnf install openssl-devel - macOS:
xcode-select --install - Windows: Visual Studio C++ Build Tools
- Ubuntu / Debian:
1. Clone the Repository
Terminal
git clone https://github.com/Shantodotdev/blacksparrow.git
cd blacksparrow2. Workspace Layout
The repository is structured as a Cargo workspace:
- Root (
.):src/lib.rs: The core engine library (blacksparrow).src/main.rs: The headless command-line binary (blacksparrow).
- Desktop Shell (
src-tauri/):- Native Tauri v2 desktop window wrapper.
- Documentation (
docs-site/):- This Docora documentation site (Next.js 16 + React 19 + Tailwind CSS 4).
- Tests (
tests/):- Comprehensive integration test suites and synthetic HTML fixtures (
tests/fixtures/).
- Comprehensive integration test suites and synthetic HTML fixtures (
3. Compiling the Binary
Development Build (Fast Compilation)
Terminal
cargo buildThe executable is placed in ./target/debug/blacksparrow.
Optimized Release Binary (Maximum Speed)
Terminal
cargo build --releaseThe release build enables link-time optimization (LTO) and code generation tuning. The resulting binary in ./target/release/blacksparrow is fully optimized and under 15 MB.
Global Installation
To install blacksparrow directly to your ~/.cargo/bin:
Terminal
cargo install --path .4. Code Standards & Linting
Before opening a pull request, ensure the codebase is formatted and passes clippy checks:
Terminal
# Format all workspace files
cargo fmt --all
# Run clippy with strict warnings
cargo clippy --all-targets -- -D warnings