This guide covers building and installing RiceCoder from source on Linux, macOS, and Windows.
- Quick Start
- Prerequisites
- Installation by Platform
- Configuration
- Verification
- Troubleshooting
- Uninstallation
curl -fsSL https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install | bashcd ricecoder
chmod +x scripts/install.sh
./scripts/install.shiex (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install.ps1')cd ricecoder
.\scripts\install.ps1cd ricecoder
scripts\install.batDownload and run the installation script directly:
curl -fsSL https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install | bashThis automatically detects your OS and runs the appropriate installation script.
With options:
curl -fsSL https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install | bash -s -- --prefix /usr/local --debugDownload and run the installation script directly:
iex (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install.ps1')Or with newer PowerShell (7+):
iex (Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install.ps1').ContentWith options:
$params = @{
Prefix = "C:\Program Files\ricecoder"
BuildMode = "debug"
}
iex (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/moabualruz/ricecoder/main/scripts/install.ps1') @params- Rust 1.70+: Install from https://rustup.rs/
- Git: Install from https://git-scm.com/
- Cargo: Included with Rust
- Build Tools:
gcc,make,pkg-config - Development Headers:
libssl-dev,libffi-dev
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev libffi-devFedora/RHEL:
sudo dnf install -y gcc make pkg-config openssl-devel libffi-develArch:
sudo pacman -S base-devel pkg-config openssl- Xcode Command Line Tools:
xcode-select --install - Homebrew (optional): Install from https://brew.sh/
xcode-select --install- Visual Studio Build Tools or MSVC Compiler
- Windows 10/11
Download from: https://visualstudio.microsoft.com/downloads/
Select "Desktop development with C++" workload.
cd ricecoder
chmod +x scripts/install.sh
./scripts/install.sh [OPTIONS]Options:
--prefix PATH: Installation prefix (default:~/.local)--release: Build in release mode (default)--debug: Build in debug mode--no-strip: Don't strip binaries--verbose: Show verbose output--help: Show help message
Examples:
# Install to ~/.local (default)
./scripts/install.sh
# Install to /usr/local
./scripts/install.sh --prefix /usr/local
# Debug build
./scripts/install.sh --debug
# Verbose output
./scripts/install.sh --verbose# Build
cd ricecoder
cargo build --release
# Install binaries
mkdir -p ~/.local/bin
cp target/release/ricecoder* ~/.local/bin/
# Add to PATH
export PATH="$HOME/.local/bin:$PATH"
# Make permanent (add to ~/.bashrc or ~/.zshrc)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrccd ricecoder
chmod +x scripts/install.sh
./scripts/install.sh [OPTIONS]Examples:
# Install to ~/.local (default)
./scripts/install.sh
# Install to /usr/local
./scripts/install.sh --prefix /usr/local
# Debug build
./scripts/install.sh --debugbrew install ricecoder# Build
cd ricecoder
cargo build --release
# Install binaries
mkdir -p ~/.local/bin
cp target/release/ricecoder* ~/.local/bin/
# Add to PATH
export PATH="$HOME/.local/bin:$PATH"
# Make permanent (add to ~/.zprofile)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofilecd ricecoder
.\scripts\install.ps1 [OPTIONS]Options:
-Prefix PATH: Installation prefix (default:$env:LOCALAPPDATA\ricecoder)-Release: Build in release mode (default)-Debug: Build in debug mode-Verbose: Show verbose output-Help: Show help message
Examples:
# Install to AppData (default)
.\scripts\install.ps1
# Install to Program Files
.\scripts\install.ps1 -Prefix "C:\Program Files\ricecoder"
# Debug build
.\scripts\install.ps1 -Debug
# Verbose output
.\scripts\install.ps1 -Verbosecd ricecoder
scripts\install.bat [OPTIONS]Options:
--prefix PATH: Installation prefix (default:%LOCALAPPDATA%\ricecoder)--release: Build in release mode (default)--debug: Build in debug mode--verbose: Show verbose output--help: Show help message
Examples:
REM Install to AppData (default)
scripts\install.bat
REM Install to Program Files
scripts\install.bat --prefix "C:\Program Files\ricecoder"
REM Debug build
scripts\install.bat --debug# Build
cd ricecoder
cargo build --release
# Create installation directory
$InstallDir = "$env:LOCALAPPDATA\ricecoder\bin"
New-Item -ItemType Directory -Path $InstallDir -Force
# Copy binaries
Copy-Item -Path "target\release\ricecoder*.exe" -Destination $InstallDir
# Add to PATH (permanent)
[Environment]::SetEnvironmentVariable(
"PATH",
"$env:PATH;$InstallDir",
"User"
)RiceCoder looks for configuration in this order:
- Project-level:
.ricecoder/config.yamlin project root - User-level:
~/.ricecoder/config.yaml(Linux/macOS) or%APPDATA%\ricecoder\config.yaml(Windows) - System-level:
/etc/ricecoder/config.yaml(Linux) orC:\ProgramData\ricecoder\config.yaml(Windows) - Built-in defaults: Compiled defaults
# ~/.ricecoder/config.yaml
# Theme settings
theme:
name: "dark"
colors:
primary: "#007acc"
secondary: "#6a9955"
# Keybindings
keybindings:
quit: "q"
help: "?"
execute: "Enter"
# Performance
performance:
max_workers: 4
timeout_ms: 30000
# Logging
logging:
level: "info"
format: "json"Override configuration with environment variables:
# Linux/macOS
export RICECODER_THEME=dark
export RICECODER_LOG_LEVEL=debug
# Windows (PowerShell)
$env:RICECODER_THEME = "dark"
$env:RICECODER_LOG_LEVEL = "debug"
# Windows (CMD)
set RICECODER_THEME=dark
set RICECODER_LOG_LEVEL=debug# Linux/macOS
ricecoder --version
ricecoder --help
# Windows
ricecoder.exe --version
ricecoder.exe --helpcd ricecoder
cargo test --releasecd ricecoder
cargo benchInstall Rust from https://rustup.rs/:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envInstall Visual Studio Build Tools:
- Download from https://visualstudio.microsoft.com/downloads/
- Select "Desktop development with C++"
- Install
Install development headers:
# Ubuntu/Debian
sudo apt-get install -y build-essential pkg-config libssl-dev
# Fedora/RHEL
sudo dnf install -y gcc make pkg-config openssl-devel
# Arch
sudo pacman -S base-devel pkg-config opensslReduce parallel jobs:
cargo build --release -j 2Add installation directory to PATH:
Linux/macOS:
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcWindows (PowerShell):
[Environment]::SetEnvironmentVariable(
"PATH",
"$env:PATH;$env:LOCALAPPDATA\ricecoder\bin",
"User"
)Make binary executable:
chmod +x ~/.local/bin/ricecoder*Create configuration directory:
Linux/macOS:
mkdir -p ~/.ricecoder
cp config/default.yaml ~/.ricecoder/config.yamlWindows:
New-Item -ItemType Directory -Path "$env:APPDATA\ricecoder" -Force
Copy-Item -Path "config\default.yaml" -Destination "$env:APPDATA\ricecoder\config.yaml"- Check system resources (CPU, memory)
- Reduce number of workers:
RICECODER_MAX_WORKERS=2 - Use release build:
cargo build --release
- Reduce worker count:
RICECODER_MAX_WORKERS=2 - Increase timeout:
RICECODER_TIMEOUT_MS=60000 - Check for memory leaks:
valgrind ricecoder
# Remove binaries
rm -f ~/.local/bin/ricecoder*
# Remove configuration
rm -rf ~/.ricecoder
# Remove documentation
rm -rf ~/.local/share/doc/ricecoder# Remove binaries
Remove-Item -Path "$env:LOCALAPPDATA\ricecoder\bin" -Recurse -Force
# Remove configuration
Remove-Item -Path "$env:APPDATA\ricecoder" -Recurse -Force
# Remove documentation
Remove-Item -Path "$env:LOCALAPPDATA\ricecoder\share" -Recurse -ForceREM Remove binaries
rmdir /s /q "%LOCALAPPDATA%\ricecoder\bin"
REM Remove configuration
rmdir /s /q "%APPDATA%\ricecoder"
REM Remove documentation
rmdir /s /q "%LOCALAPPDATA%\ricecoder\share"# Build with specific features
cargo build --release --features "feature1,feature2"
# Build with optimizations
RUSTFLAGS="-C target-cpu=native" cargo build --release
# Build with debug symbols
cargo build --release --debug-assertionsBuild for different target:
# List available targets
rustup target list
# Install target
rustup target add x86_64-unknown-linux-gnu
# Build for target
cargo build --release --target x86_64-unknown-linux-gnuFROM rust:latest
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim
COPY --from=0 /app/target/release/ricecoder* /usr/local/bin/
ENTRYPOINT ["ricecoder"]Build and run:
docker build -t ricecoder .
docker run -it ricecoder --help- Documentation: https://github.com/moabualruz/ricecoder/wiki
- Issues: https://github.com/moabualruz/ricecoder/issues
- Discussions: https://github.com/moabualruz/ricecoder/discussions
- README.md - Project overview
- CONTRIBUTING.md - Contributing guidelines
- SECURITY.md - Security policy
- LICENSE.md - License information