Skip to content

Build and run

The workspace has three crates: vst3-host, daw-engine (crates/engine) and daw (src-tauri, the application). The frontend is in src/ and builds with Vite.

The flake provides the package, an app, a dev shell, an overlay and a check, for x86_64-linux and aarch64-linux.

Terminal window
nix develop # or `nix-shell`: Rust, Node, WebKitGTK, ALSA/JACK/PipeWire
pnpm install # or `npm install`
pnpm tauri dev # or `npm run tauri dev`
pnpm tauri dev -- -- path/to/Song.marbble # open a project at launch
  • nix/shell.nix takes its inputs from the package (inputsFrom = [ marbble ]), so the shell and nix build use the same libraries. It adds cargo, rustc, clippy, rustfmt, rust-analyzer and Node, sets GIO_MODULE_DIR and the GSettings schemas for GTK file dialogs, and puts ALSA, JACK, PipeWire and D-Bus on LD_LIBRARY_PATH for dev builds.
  • tauri.conf.json runs npm run dev (Vite on port 1420) before a dev build and npm run build before a release build, whichever package manager you use to start Tauri.
  • Both package-lock.json and pnpm-lock.yaml are kept. The Nix package installs npm dependencies from package-lock.json, so keep it current when you change dependencies (see Packaging).
  • For real-time audio scheduling, rtkit must be available (security.rtkit.enable = true; on NixOS; PipeWire setups usually have it).

Other flake outputs:

Terminal window
nix run . # build and launch Marbble
nix build . # result/bin/marbble (and result/bin/daw), desktop entry and icons
nix profile install . # install it for your user
nix flake check # builds the package, which runs the engine's unit tests

To use it in a NixOS or home-manager configuration, take the flake as an input and use marbble.packages.${system}.default, or add marbble.overlays.default to nixpkgs.overlays and use pkgs.marbble.

Flakes only see files that git tracks, so git add new files before nix build.

Install Rust (stable), Node.js (22 or newer; see Tests), the Tauri 2 prerequisites (webkit2gtk-4.1, gtk3, libsoup-3, librsvg, openssl), and alsa-lib, libpipewire-0.3, jack (libjack2), dbus, pkg-config and libclang (bindgen uses it to generate the PipeWire bindings). Then:

Terminal window
pnpm install && pnpm tauri dev

The audio engine (cpal: WASAPI on Windows, Core Audio on macOS), MIDI (midir), VST3 module loading, the built-in effects and the UI are cross-platform, and pnpm tauri build produces native bundles. Install Rust, Node.js and the Tauri 2 prerequisites for the platform (the WebView2 runtime and the MSVC build tools on Windows, the Xcode command line tools on macOS). Plug-in editor windows are implemented for Linux/X11 and macOS so far (crates/vst3-host/src/editor_other.rs is the Windows placeholder), and the input level check (sysvol.rs) is Linux-only. The Nix package is Linux-only. CI runs the unit tests on all three platforms and the release workflow builds bundles for them (see Versioning and releases), but the app gets far less hands-on testing on Windows and macOS.

Run them from the repository root (inside nix develop on NixOS).

Terminal window
cargo build -p daw # the whole app, including the Tauri crate
cargo test -p daw-engine --lib # engine unit tests
cargo test -p daw # Tauri crate tests (settings parsing)
cargo run -q -p daw-engine --example <name> -- <args> # headless checks, below
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --all # rustfmt.toml sets the rules
npx tsc --noEmit -p . # type-check the frontend

The dev profile (root Cargo.toml) builds the app crate at opt-level = 1, dependencies at opt-level = 2, and daw-engine and vst3-host at opt-level = 3, so tauri dev has the same CPU headroom for audio as a release build.