Get the source
git clone https://github.com/ctrlaltmg/ctrlaltnotes.git
cd ctrlaltnotes
Requirements: Rust. The exact compiler version is pinned in rust-toolchain.toml; rustup installs it automatically the first time you run cargo in the folder. All commands below run in the repository root.
Prefer a ready-made build? Download a release and verify it as described in Install and open.
Release gate (before every commit and release)
./scripts/check.sh
See Testing. CI runs the same checks.
Tests
cargo test
Builds and tests core, service and server (the desktop shell is excluded from default-members on purpose). The first run downloads crates. This executes the RFC known-answer tests, the NFKC test against the real crypto crates.
Use cargo test --release to speed up Argon2.
Web version
Options of the web binary (vault folder, sync target, port, idle lock) are listed in Web host.
cargo run --release -p ctrlaltnotes-server
cargo build --release -p ctrlaltnotes-server # → target/release/ctrlaltnotes-web
macOS app
xcode-select --install
cargo install tauri-cli --version "^2" --locked
cargo tauri build # → target/release/bundle/macos and dmg
cargo tauri dev # live development
Universal binary:
rustup target add aarch64-apple-darwin x86_64-apple-darwin
cargo tauri build --target universal-apple-darwin
Unsigned app: System Settings → Privacy & Security → Open Anyway after the first launch attempt, or xattr -dr com.apple.quarantine /Applications/CtrlAltNotes.app for an app you built or verified yourself.
Windows app
Build on Windows (Tauri does not reliably cross-compile Windows installers from a Mac).
- Visual Studio Build Tools with Desktop development with C++.
- Rust (
x86_64-pc-windows-msvc). - WebView2 is part of Windows 10/11; the installer bundles the bootstrapper. For a fully offline installer set
"webviewInstallMode": {"type": "offlineInstaller"}(about +130 MB).
cargo install tauri-cli --version "^2" --locked
cargo tauri build # → target\release\bundle\nsis and msi
A GitHub Actions windows-latest runner can run the same commands.
Linux app
Build on Linux (x86_64 or aarch64). Tauri uses the system WebKitGTK 4.1 webview, so the build needs its development headers.
Debian / Ubuntu 22.04+:
sudo apt install build-essential curl file pkg-config libssl-dev \
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev
Fedora:
sudo dnf install gcc pkgconf-pkg-config openssl-devel webkit2gtk4.1-devel gtk3-devel librsvg2-devel libxdo-devel
Arch:
sudo pacman -S --needed base-devel webkit2gtk-4.1 gtk3 librsvg xdotool openssl
Then:
cargo install tauri-cli --version "^2" --locked
cargo tauri build # → target/release/bundle/deb, rpm and appimage
cargo tauri build --bundles appimage # only the AppImage
The .deb and .rpm declare WebKitGTK 4.1 and GTK 3 as dependencies (bundle.linux in tauri.conf.json). The AppImage carries its own libraries. A GitHub Actions ubuntu-22.04 runner can run the same commands after the apt install line.
The app sets WEBKIT_DISABLE_DMABUF_RENDERER=1 at start (unless you set it yourself) because the DMA-BUF renderer leaves the window blank on many NVIDIA drivers. Start it with WEBKIT_DISABLE_DMABUF_RENDERER=0 to opt back in.
Regenerating assets
python3 brand/make_brand.py # app icons and logos (needs rsvg-convert, Pillow, fontTools)
How dependencies are chosen and tracked
- Chosen: only when the standard library or existing code can't reasonably do the job. A new
dependency must be widely used, maintained, under a license on the
deny.tomlallow list, and its pull request must say why it is needed. Cryptography comes only from the audited RustCrypto crates. The UI has no third-party JavaScript. - Obtained: from crates.io only (
deny.toml,[sources]), with exact versions and checksums inCargo.lock; every build uses--locked. GitHub Actions are pinned to full commit hashes. The website's Python tools are pinned inrequirements.txt. - Tracked: Dependabot opens weekly update pull requests (crypto crates are bumped by hand, see
below);
cargo audit,cargo denyand OSV-Scanner check every change against the RustSec and OSV databases; every release ships a CycloneDX SBOM. See the scanning policy inSECURITY.md.
Dependency pins
argon2 = 0.5.3, chacha20poly1305 = 0.10.1, hkdf = 0.12, sha2 = 0.10, getrandom = 0.2, base64 = 0.22. Do not bump the first two to their 0.6 / 0.11 lines without porting crates/core/src/crypto.rs.
Releases
Releases are built only by .github/workflows/release.yml, never on a laptop:
- Update the version in every
Cargo.tomland inapp/tauri.conf.json, and add the changelog entry. Run./scripts/check.sh. - Commit, then create a signed tag and push it:
git tag -s v0.1.0-alpha.1 -m "v0.1.0-alpha.1", thengit push origin v0.1.0-alpha.1. - The workflow:
* runs the tests on macOS, Windows and Linux;
* builds the macOS universal
.dmg, the Windows NSIS installer, the Linux.deb,.rpmand AppImage, and the web binaries; * writesSHA256SUMSand a CycloneDX SBOM; * creates a build-provenance attestation for every file; * opens a draft pre-release. - Review the draft (files, notes), then publish it.
The Windows build produces only the NSIS installer: the MSI format can't carry a pre-release version such as -alpha.1. Code signing (Apple Developer ID with notarization, Windows Authenticode) is not set up yet; until it is, users verify downloads with gh attestation verify or SHA256SUMS.