Skip to main content
This guide covers everything you need to build Rode from source code.

Prerequisites

Rust Toolchain

Required: Rust 2021 edition or laterInstall via rustup

Cargo

Required: Cargo package managerComes bundled with Rust
Rode requires Rust 2021 edition as specified in Cargo.toml. Ensure your Rust installation is up to date:
rustup update stable

Quick Start

The fastest way to get Rode running:
1

Clone the repository

git clone https://github.com/kashsuks/rode
cd rode
2

Run the editor

cargo run
This will:
  • Download and compile all dependencies
  • Build the Rode binary
  • Launch the editor
The first build will take several minutes as Cargo downloads and compiles all dependencies. Subsequent builds will be much faster thanks to incremental compilation.

Build Commands

Development Build

For testing and development:
cargo run
This creates an unoptimized debug build with full debug symbols.

Release Build

For production use with optimizations:
cargo build --release
The optimized binary will be located at:
target/release/rode-editor
Release builds are significantly faster and smaller than debug builds. Use cargo run --release to test release performance.

Running Tests

Rode includes a test suite in the tests/ directory:
cargo test

Dependencies

Rode relies on the following core dependencies (from Cargo.toml):

GUI Frameworks

DependencyVersionPurpose
eframe0.29egui framework wrapper
egui0.29Immediate mode GUI library
iced0.14.0Widget-based GUI framework

Syntax Highlighting

DependencyVersionPurpose
tree-sitter-highlight0.25Syntax tree parsing
tree-sitter-rust0.24Rust grammar
tree-sitter-javascript0.23JavaScript grammar
tree-sitter-typescript0.23TypeScript grammar
tree-sitter-python0.23Python grammar
syntect5.xSyntax highlighting engine

Graphics & Rendering

DependencyVersionPurpose
image0.24Image loading and processing
resvg0.29SVG rendering
usvg0.29SVG parsing
tiny-skia0.112D graphics rendering
DependencyVersionPurpose
ignore0.4.gitignore-aware file walking
fuzzy-matcher0.3Fuzzy string matching
rfd0.15Native file dialogs
include_dir0.7Embed directories at compile time

Utilities

DependencyVersionPurpose
serde1.0Serialization framework
serde_json1.0JSON serialization
regex1.10Regular expressions
once_cell1.19Lazy static values
dirs5.xPlatform-specific directories
reqwest0.12HTTP client (for updates/WakaTime)
All dependencies are automatically managed by Cargo. You don’t need to install them manually.

Platform-Specific Instructions

macOS Silicon (M1/M2/M3)

For Apple Silicon Macs, download the pre-built binary:
# Download rode-editor-apple-silicon from GitHub Releases
# Make it executable
chmod +x /path/to/rode-editor-apple-silicon

# Run the editor
./rode-editor-apple-silicon

First Run on macOS

If macOS blocks the app as unverified:
1

Open System Settings

Navigate to Privacy & Security
2

Allow the app

Scroll down to the Security sectionYou should see a message about rode-editor-apple-silicon
3

Click 'Open Anyway'

Grant permission to run the application

Building from Source

# Install Rust via Homebrew or rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Clone and build
git clone https://github.com/kashsuks/rode
cd rode
cargo build --release

Installation via Crates.io

Rode is published on crates.io and can be installed with:
cargo install rode-editor
This will:
  • Download the latest stable version (currently 0.4.1)
  • Compile with optimizations
  • Install the binary to ~/.cargo/bin/rode-editor
Make sure ~/.cargo/bin is in your PATH to run rode-editor from anywhere.

Build Optimization

Faster Compilation

To speed up compile times during development:
  1. Use the Mold Linker (Linux):
    # .cargo/config.toml
    [target.x86_64-unknown-linux-gnu]
    linker = "clang"
    rustflags = ["-C", "link-arg=-fuse-ld=mold"]
    
  2. Enable Parallel Compilation:
    # Set in your shell profile
    export CARGO_BUILD_JOBS=8
    
  3. Use cargo-watch for auto-rebuild:
    cargo install cargo-watch
    cargo watch -x run
    

Smaller Binaries

To reduce release binary size, add to Cargo.toml:
[profile.release]
opt-level = "z"     # Optimize for size
lto = true          # Enable link-time optimization
codegen-units = 1   # Better optimization
strip = true        # Remove debug symbols
These optimizations will increase compile time but significantly reduce binary size.

Troubleshooting

Solution: Ensure you have a C/C++ compiler installed:
  • macOS: xcode-select --install
  • Linux: sudo apt-get install build-essential
  • Windows: Install Visual Studio Build Tools
Solution: Install OpenSSL development headers:
  • macOS: brew install openssl
  • Linux: sudo apt-get install libssl-dev
  • Windows: Use the rustls-tls feature instead (reqwest already uses it)
Expected behavior: The first build compiles all dependencies from scratch.Typical first build times:
  • Debug: 5-10 minutes
  • Release: 10-15 minutes
Subsequent builds are much faster (seconds to minutes).
Solution: Cargo builds can use significant disk space. Clean old artifacts:
cargo clean
Or clean the global cache:
rm -rf ~/.cargo/registry
rm -rf ~/.cargo/git
The GitHub main branch contains development commits that may not be stable. These are developer logs, not user-friendly releases.
Solutions:
  • Use releases from GitHub Releases
  • Install via cargo install rode-editor for the latest stable version
  • Expect instability in nightly builds when they arrive

Development Workflow

Recommended workflow for Rode development:
1

Fork and clone

git clone https://github.com/YOUR_USERNAME/rode
cd rode
2

Create a feature branch

git checkout -b feature/my-feature
3

Make changes and test

cargo run  # Test your changes
cargo test # Run tests
cargo clippy # Check for warnings
4

Format code

cargo fmt
5

Commit and push

git add .
git commit -m "Add feature: description"
git push origin feature/my-feature
See the Contributing Guide for detailed contribution guidelines.

Build Artifacts

After building, you’ll find:
rode/
├── target/
│   ├── debug/
│   │   └── rode-editor          # Debug binary
│   └── release/
│       └── rode-editor          # Release binary (optimized)
├── Cargo.lock                   # Locked dependency versions
└── Cargo.toml                   # Project manifest

Next Steps

Architecture

Understand Rode’s internal architecture

Contributing

Learn how to contribute to Rode