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

Build the web interface, then the Rust server. Local development and CI use the same cargo xtask commands.

Prerequisites

ToolRequirement
RustInstall through rustup; use rust-toolchain.toml
Node26
pnpm11; exact version in web/package.json
Native build toolsC/C++ compiler and CMake

On Debian or Ubuntu:

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

On macOS:

brew install cmake

Cargo installs the pinned nightly compiler and components automatically. The workspace uses -Zpolonius=next, so the pinned toolchain is required. SoapySDR loads at runtime and needs no build-time development package.

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

Open http://localhost:8080. Distributable builds embed web/dist; build the frontend first. Backend-only builds can compile with a placeholder interface if that directory is missing.

For frontend hot reload and automatic backend restarts:

cargo xtask dev --watch

Open http://localhost:5173. Vite proxies API and WebSocket traffic to port 8080. Omit --watch to leave backend restarts manual.

Backend feature flags

The server defaults enable soapy, sdrplay, cr8, rtlsdr, hackrf, airspy, airspyhf, ad936x, net-client, and gpu-fft. Packaged releases use a selected subset; see hardware requirements.

Disable hardware backends:

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

Keep direct rtl_tcp and SpyServer clients:

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

SigMF playback remains available in both builds.

Development signal sources

Debug builds expose the signal generator and synthetic array/transceiver sources. Release builds hide them and keep recording playback available.

To test audio in a debug build, select Signal Generator (virtual) on Device, connect an NFM channel at 300 kHz above the Device centre, then connect its audio to Speaker. Starting playback produces a 1 kHz tone.

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
cargo xtask sanitizeDecoder tests with the vendored C under AddressSanitizer and UndefinedBehaviorSanitizer
cargo xtask fuzzlibFuzzer against every decoder, channel settings, and the dPMR vocoder chain

Install the tools needed for your checks:

cargo install --locked cargo-nextest cargo-deny cargo-fuzz
pnpm --dir web exec playwright install chromium

test needs cargo-nextest, audit needs cargo-deny, and fuzz needs cargo-fuzz. Sanitizer tests also require clang. Automated tests use virtual devices and never require real hardware.

Generated files

Regenerate and commit outputs when their sources change:

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
A git dependency's revcargo xtask nix-hashThe cargo git hashes 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

cargo xtask check detects stale contracts and metadata. nix-hash uses Nix on Linux or a nixos/nix container elsewhere. It updates the pnpm store hash and Cargo git-dependency hashes. Local checks compare lockfile digests and commits; Nix CI verifies the hashes by building.

Desktop prerequisites

The Tauri app is outside the default workspace members. Linux needs WebKitGTK and desktop integration libraries. Use cargo xtask desktop for the compile gate and follow Desktop bundles to create installers.

Before opening a pull request

Format, lint, check, and test the affected parts. For documentation, run mdbook build docs and check local links and anchors. For code, the full gates are:

cargo xtask check
cargo xtask test

Add browser, desktop, DSP performance, or hardware validation when the change needs it. See Contributing.