Development Guide
Everything you need to build, test, and package Driftleaf locally.
Table of Contents
Prerequisites
Base Requirements
| Tool | Version | Required For |
|---|---|---|
| Node.js | v24.22.1 | Frontend build tools and Node-based reference/test scripts; not needed by installed apps |
| npm | v8+ | All builds |
Rust toolchain (cargo, rustc) |
stable | Building/running the Tauri shell and storage backend |
| WebKitGTK + GTK3 dev packages (Linux) | — | webkit2gtk-4.1, javascriptcoregtk-4.1, gtk+-3.0 and their -devel/-dev packages, by whatever name your distro uses |
Important Notice
Installing build tools, package manager dependencies, or third-party packages can modify your system, add services, change package versions, and in some cases break software already installed on your machine. Only install packages you understand and trust, and use the commands in this guide at your own risk.
AetherAssembly and its contributors are not responsible for any system breakage, dependency conflicts, data loss, or other issues caused by following these instructions or installing packages from external sources.
Platform-Specific Build Tools
Arch Linux
sudo pacman -S --needed webkit2gtk-4.1 gtk3 libappindicator-gtk3 librsvg rust
Debian/Ubuntu
sudo apt-get install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf build-essential
Fedora/RHEL/CentOS
sudo dnf install webkit2gtk4.1-devel gtk3-devel libappindicator-gtk3-devel librsvg2-devel rpm-build
openSUSE
sudo zypper install webkit2gtk3-devel gtk3-devel libappindicator3-devel librsvg-devel
Install Rust itself from rustup.rs on any platform, including Windows and macOS.
AppImage Exception: Most Linux dependencies are bundled inside the AppImage. However, FUSE3 may be required at runtime on some distributions (
sudo apt install libfuse2for legacy support).
Local Development
Initial Setup for Linux
# GitHub Packages auth (one-time setup)
echo "//npm.pkg.github.com/:_authToken=<your-token>" >> ~/.npmrc
# Install dependencies
npm install
# Launch the Tauri shell in dev mode
npx tauri dev
Initial Setup for Windows
1. Open your User Folder
- Press
Windows Key + Rto open the Run dialog. - Type
%userprofile%and press Enter. (This opens your user folder, likeC:\Users\YourName).
2. Create the .npmrc file
-
Inside that folder, right-click and select New > Text Document.
-
Name the file exactly:
.npmrc -
Important: Windows might add
.txtto the end. You need to make sure the final name is.npmrc, not.npmrc.txt.- If you can’t see file extensions: In File Explorer, click View at the top, and check the box for File name extensions. Then rename the file to remove the
.txt. - Alternatively, when saving, select “All Files” as the file type and name it
.npmrc.
Show example

- If you can’t see file extensions: In File Explorer, click View at the top, and check the box for File name extensions. Then rename the file to remove the
3. Add the content
-
Right-click the newly created
.npmrcfile and choose Open with > Notepad. -
Paste the following line inside:
//npm.pkg.github.com/:_authToken=YOUR_TOKEN -
Replace
YOUR_TOKENwith your actual GitHub Personal Access Token (PAT). (Make sure the token has theread:packagesscope enabled, as the image notes). -
Save the file and close Notepad.
In-Depth
aether-packagesinstallation notes are available in the repo and on the wiki.
4. Verify and use
- Open a new PowerShell or CMD window.
- Run
npm installagain. It should now use the token in that file to authenticate with GitHub Packages.
⚠️ Note: Never commit this .npmrc file to a public Git repository, as it contains your secret token!
Common Commands
| Command | Description |
|---|---|
npx tauri dev |
Launch the full app (Rust shell and in-process Rust storage backend) |
npm run dev |
Launch just the renderer’s dev server (for quick UI iteration; no backend) |
npm run build |
Typecheck + build the renderer bundle (no packaging) |
npm run lint |
Run ESLint checks |
npm run typecheck |
Run TypeScript compiler without emitting |
npm test |
Run Node reference-service, storage, and compatibility regression scripts |
cargo test --manifest-path crates/driftleaf-core/Cargo.toml |
Test the Rust storage backend |
cargo test --manifest-path src-tauri/Cargo.toml |
Test the Tauri host and its Rust integration |
npm run test:rust-compat |
Run cross-language storage-format and behavior compatibility tests |
node scripts/tests/data-loss.js |
Run vault, database, and recovery integration tests |
Running the UI in a browser
npm run dev:web starts the renderer against the Node reference backend with no Tauri
shell, and prints a URL to open in any browser. Native dialogs are replaced by fixed paths
inside a temporary directory that is deleted on exit, and extensions and updates are
stubbed. This harness is for browser-only UI work; it does not exercise the production Rust
backend. Never point it at a real branch. See the comment at the top of
scripts/dev/web-harness.mjs.
npm run test:ui drives that same setup in headless Firefox from “create a branch” through
writing, attaching, deleting, and restoring, and fails if any step misbehaves. It also
writes the product screenshots used by the README and website to docs/screenshots/
(pass another directory as an argument to leave those untouched). It needs Firefox on
PATH, or FIREFOX=/path/to/firefox. Because it renders with Firefox’s engine rather
than the WebKit/WebView2 engine a release build uses, it complements a click-through of a
packaged build; it does not replace one.
Debugging the Node Reference Search
export DEBUG_SEARCH=1
npx tauri dev
This enables timing output in the Node reference implementation used by its scripts; it does not instrument the Rust backend used by the desktop app.
Building Packages
npm run package:tauri # this platform's native targets (deb+rpm on Linux)
npm run package:tauri -- --bundles appimage # Linux: AppImage only
npm run package:tauri -- --bundles dmg # macOS: dmg
npm run package:tauri -- --bundles nsis # Windows: installer
Artifacts land under src-tauri/target/release/bundle/<format>/. The app’s identity for
these release builds comes from src-tauri/tauri.release.conf.json (merged over the base
src-tauri/tauri.conf.json). The bundle contains the Tauri app and its Rust backend; it
does not contain a Node runtime or sidecar. Node is only needed on the build/test machine.
For a local-only unsigned package without that key, append
--config '{"bundle":{"createUpdaterArtifacts":false}}' to the build command.
See docs/UPDATES.md for updater status.
Versioning during development
node scripts/tauri/version.mjs 0.8.2
Syncs package.json/package-lock.json/src-tauri/tauri.conf.json/Cargo.toml/
Cargo.lock/the RPM spec to one version number, without invoking npm version or
creating a commit or tag — useful for rolling development checkpoints between releases.
Add the checkpoint’s changes to [Unreleased] in CHANGELOG.md and the RPM spec’s own
changelog. The tag-triggered release.yml workflow uses the same script (with
--allow-same) to set the real release version before packaging.
On Linux, if a built app’s window opens but stays blank (GBM/DMA-BUF buffer allocation failures in the terminal output — a known WebKitGTK compositing gap with some GPU drivers, most documented with NVIDIA’s proprietary driver), set these before launching:
WEBKIT_DISABLE_COMPOSITING_MODE=1 WEBKIT_DISABLE_DMABUF_RENDERER=1 LIBGL_ALWAYS_SOFTWARE=1 npx tauri dev
These variables allowed native Wayland rendering on a tested CachyOS/NVIDIA system without forcing X11. They are a workaround to test on affected hardware, not a default for every Linux system.
Platform-Specific Requirements
Runtime Dependencies (Declared in Package Metadata)
These are automatically added to your package’s dependency list but good to know for testing:
| Component | Debian/Ubuntu | Fedora/RPM | Arch |
|---|---|---|---|
| WebKitGTK | libwebkit2gtk-4.1-0 |
webkit2gtk4.1 |
webkit2gtk-4.1 |
| GTK3 | libgtk-3-0 |
gtk3 |
gtk3 |
| App Indicators | libappindicator3-1 |
libappindicator-gtk3 |
libappindicator-gtk3 |
AppImage Exception: Most dependencies are bundled inside the AppImage. However, FUSE3 may be required at runtime on some distributions (
sudo apt install libfuse2for legacy support).
Troubleshooting
Common Issues
“Permission denied” on AppImage
chmod +x "Driftleaf_*.AppImage"
"./Driftleaf_<version>_amd64.AppImage"
failed to run linuxdeploy while building an AppImage
If the log reports that the release binary was built before this error, Rust
compilation succeeded but AppImage bundling failed. A verbose build may reveal
the cause, such as Could not find dependency: libjxl.so.0.12 when WebKitGTK
expects that ABI but the system only has a newer libjxl.so.0.13. Point
LD_LIBRARY_PATH at a directory containing compatible libraries (including
libjxl.so.0.12 and libjxl_cms.so.0.12):
LD_LIBRARY_PATH=/path/to/compatible-libraries npm run package:tauri -- --bundles appimage --config '{"bundle":{"createUpdaterArtifacts":false}}'
The config override is only for local unsigned packages without the updater signing key; omit it for release builds. Do not symlink a newer incompatible SONAME to the missing version. If the error names a different dependency, use a compatible build of that dependency instead.
You can download the proper binaries for libjxl from your Distro’s Package Archive, or from the libjxl repo
Window opens but stays blank on Linux
See the WebKitGTK compositing workaround above.
Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
See Contributing for full guidelines.