-
-
Notifications
You must be signed in to change notification settings - Fork 6
Building from Source
Alejandro Quintanar edited this page Nov 30, 2025
·
1 revision
Guide for building TERM39 from source code.
Install Rust via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shMinimum version: Rust 1.70+
# For clipboard support
sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
# For framebuffer fonts
sudo apt install kbd unifontsudo dnf install libxcb-develNo additional dependencies required. Xcode Command Line Tools recommended:
xcode-select --installNo additional dependencies required. Visual Studio Build Tools recommended.
git clone https://github.com/alejandroqh/term39.git
cd term39# Debug build (faster compile, slower runtime)
cargo build
# Release build (optimized)
cargo build --release# Full features (default on Linux)
cargo build --release
# Without framebuffer (smaller binary)
cargo build --release --no-default-features --features clipboard,battery
# Without clipboard (for servers/containers)
cargo build --release --no-default-features --features battery
# Minimal build
cargo build --release --no-default-features# Add target
rustup target add x86_64-unknown-linux-musl
# Build for target
cargo build --release --target x86_64-unknown-linux-musl# Debug build
cargo run
# Release build
cargo run --release
# With arguments
cargo run --release -- --ascii --theme dark# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture# Lint with Clippy
cargo clippy
# Format code
cargo fmt
# Check formatting
cargo fmt -- --check
# Full check (compile without building)
cargo check# Generate docs
cargo doc
# Generate and open docs
cargo doc --openAfter building, the binary is located at:
| Build Type | Location |
|---|---|
| Debug | target/debug/term39 |
| Release | target/release/term39 |
| Cross-compile | target/<target>/release/term39 |
# Install to ~/.cargo/bin
cargo install --path .
# Or copy manually
sudo cp target/release/term39 /usr/local/bin/| Feature | Default | Description |
|---|---|---|
clipboard |
ON | System clipboard via arboard |
framebuffer-backend |
ON (Linux) | Linux framebuffer rendering |
battery |
ON | Battery status indicator |
# All features
cargo build --release --all-features
# Specific features
cargo build --release --features "clipboard,battery"
# No default features
cargo build --release --no-default-features
# No defaults + specific
cargo build --release --no-default-features --features clipboardInstall build essentials:
# Debian/Ubuntu
sudo apt install build-essential
# Fedora
sudo dnf install gccInstall X11 development libraries:
sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-devUse incremental compilation (default) and consider:
# Use mold linker (faster linking)
cargo install mold
RUSTFLAGS="-C link-arg=-fuse-ld=mold" cargo build --releasecargo clean
cargo build --releaseThe project uses GitHub Actions for CI. See .github/workflows/ for:
-
ci.yml- Continuous integration (test, lint, format) -
release.yml- Release builds for all platforms