leaftext is a Rust application (edition 2021). Building from source requires the Rust toolchain and theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ryanallen/leaftext/llms.txt
Use this file to discover all available pages before exploring further.
just command runner.
Prerequisites
Before building leaftext, make sure the following are installed:- Rust (stable toolchain) — install via rustup. The project targets Rust 2021 edition as declared in
Cargo.toml. justcommand runner — install withcargo install just. leaftext uses aJustfileto orchestrate formatting, type-checking, testing, and releases.- Platform-specific WebView dependency:
- Linux — WebKit2GTK development headers are required for
wry, the embedded WebView library. See the note below for installation instructions. - macOS — WKWebView is provided by the OS; no extra headers are needed.
- Windows — WebView2 is provided by the OS via the Microsoft Edge WebView2 Runtime; no extra headers are needed.
- Linux — WebKit2GTK development headers are required for
On Linux, install
libwebkit2gtk-4.1-dev (or the equivalent package for your
distribution) before building. The wry crate requires it for the WebView. On
Debian/Ubuntu this is: sudo apt install libwebkit2gtk-4.1-dev. On Arch Linux
the package is webkit2gtk-4.1.Clone and build
Clone the repository and compile in debug mode:Cargo.toml — tao, wry, pulldown-cmark, syntect, rusqlite (bundled), and others. Subsequent builds are incremental.
Run
Launch the app directly from the source tree:Ctrl+O / Cmd+O.
Verification suite
Before submitting a contribution, run the full suite:cargo fmt --check, cargo check --all-targets, and cargo test in sequence. All three steps must pass. The verify recipe is defined in the project Justfile as:
just verify is the baseline requirement before handing any work back.
Individual tasks
Each step in the verification pipeline can also be run on its own:| Task | Command | What it does |
|---|---|---|
| Format check | cargo fmt --check | Verify code formatting without modifying files |
| Type check | cargo check --all-targets | Check all targets without producing a binary |
| Tests | cargo test | Run the full test suite |
| Full verify | just verify | All three steps above in sequence |
just --list.