Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Build and test

The workspace contains the headless server, desktop shell, frontend, DSP libraries, hardware backends, protocol decoders, and project tooling. CI calls the same cargo xtask commands used locally.

Prerequisites

  • Rust through rustup. The repository pins a nightly toolchain and the rustfmt, clippy, and rust-src components in rust-toolchain.toml.
  • Node 26.
  • pnpm 11; the exact package-manager version is declared in web/package.json.
  • SoapySDR 0.8 development files for the normal local-hardware build.
  • A C/C++ toolchain and CMake for native dependencies.

On Debian or Ubuntu:

sudo apt-get update
sudo apt-get install -y build-essential cmake libsoapysdr-dev

On macOS:

brew install cmake soapysdr

The first Cargo command automatically installs the pinned Rust toolchain. Do not substitute stable Rust: the workspace intentionally uses its pinned compiler and -Zpolonius=next configuration.

Build and run

git clone https://github.com/Newspicel/sdrminusminus.git
cd sdrminusminus
pnpm --dir web install --frozen-lockfile
pnpm --dir web build
cargo run -p sdrmm

The server embeds web/dist at compile time and listens on http://localhost:8080. Build the web application before compiling a distributable binary; when the directory is absent, the server build script creates a placeholder so backend-only development can still compile.

For local development:

cargo xtask dev

This runs sdrmm with development CORS on port 8080 and Vite with hot module replacement on http://localhost:5173. Vite proxies API and WebSocket traffic to the Rust server. Pass --watch to restart the Rust server whenever backend inputs change:

cargo xtask dev --watch

Backend feature flags

The default features are soapy, sdrplay, cr8, rtlsdr, hackrf, net-client, and gpu-fft. Disable defaults to build with virtual sources only:

cargo run -p sdrmm --no-default-features

To retain direct rtl_tcp and SpyServer support:

cargo run -p sdrmm --no-default-features --features net-client

The built-in virtual driver and recording playback are always available.

Local gates

CommandWhat it runs
cargo xtask checkToolchain checks, generated-data checks, Rust format and Clippy, frontend format/lint/type-check, release-shaped builds, web build, codegen drift
cargo xtask testRust and frontend unit/integration tests using virtual devices
cargo xtask smokePlaywright against a real sdrmm process and the virtual signal generator
cargo xtask auditcargo-deny and the RustSec advisory database
cargo xtask desktopTauri desktop compile gate without building installers

Install the smoke browser once before running the Playwright gate:

pnpm --dir web exec playwright install chromium
cargo xtask smoke

cargo xtask test requires cargo-nextest, and cargo xtask audit requires cargo-deny:

cargo install --locked cargo-nextest cargo-deny

Tests never enumerate real hardware in CI. Engine and server tests construct a registry with the virtual backend, which keeps them deterministic and prevents test runs from claiming an attached radio.

Generated files

Run the matching task whenever its source changes:

Source changeCommandGenerated output
REST routes or wire typescargo xtask codegenopenapi.json, web/src/generated/schema.d.ts
Dependency lockfilescargo xtask licensesTHIRD_PARTY_NOTICES.md, embedded notices JSON
web/pnpm-lock.yamlcargo xtask nix-hashThe pnpm store hash in packaging/nix/package.nix
Decoder reference signalscargo xtask fixturesSigMF pairs under fixtures/
Band-plan source importscargo xtask bandplanEmbedded regional tables
assets/icon.svgcargo xtask iconsDesktop and web icon variants

Generated outputs are committed. cargo xtask check detects drift for the outputs that must match on every change.

cargo xtask nix-hash uses Nix on Linux and a nixos/nix container elsewhere to compute the pnpm store hash. cargo xtask check compares the lockfile digest recorded beside that hash; it does not rebuild the store. The Nix CI job verifies the store hash itself.

Desktop prerequisites

The Tauri app is outside the workspace’s default members because Linux builds need WebKit and desktop integration packages. Build it explicitly through cargo xtask desktop. To create local installers, install the Tauri CLI and the platform prerequisites, then follow Release process.

Before opening a pull request

Run the checks proportional to the change. For documentation changes, build the book with mdbook build docs and validate local links and heading anchors. Code changes should normally run:

cargo xtask check
cargo xtask test

Add cargo xtask smoke, cargo xtask desktop, or a hardware validation when the affected surface requires it.