Phasic← Overview

Feature flags

Several capabilities are optional at compile time. A build without a feature does not contain the code for it, and the corresponding controls do not appear in the interface.

Every page in this manual names the flag its feature needs in the Requires line of its reference block.

Flag Default Adds Cost of enabling
lsl on Live stream ingest over Lab Streaming Layer Pulls labstream, a pure-Rust LSL stack (no C/CMake toolchain). Opens sockets only when you browse/connect live streams
onnx off Model inference — the Inference pane, the Run model button, prediction lanes on the plot Pulls the ort crate. On Linux also needs a runtime library fetched once
audio off Playback of an incoming audio stream through the speakers Pulls cpal, which links the system audio library at build time — ALSA on Linux, CoreAudio or WASAPI elsewhere
dev-profiler off A developer performance overlay, toggled with F12, with allocation counters Installs a counting global allocator. Not intended for normal use

Enabling features

cargo run                                # default build (includes LSL live streaming)
cargo run --no-default-features          # offline file viewer only (no LSL sockets)
cargo run --features onnx                # add model inference
cargo run --features audio               # add live audio monitoring
cargo run --features onnx,audio          # flags combine
cargo run --features dev-profiler        # performance overlay

lsl is on by default because labstream is pure Rust and opens no sockets until you open the live-stream browser. audio, onnx, and dev-profiler stay opt-in.

Why these are optional

Each flag adds something a plain file viewer has no business carrying. lsl opens network sockets. audio links a system library and is the only flag that introduces a build-time system dependency. dev-profiler replaces the allocator. Leaving them off keeps a default build self-contained and quiet.

onnx gates model inference as a whole — not only its runtime. A build without it has no Inference pane, no Run model button, no prediction lanes on the plot and no model code at all. Nothing in the interface points at a capability the build does not have: the controls are absent, not greyed out.

It is optional for a reason beyond size. Every model carries its own licence, and some are restricted — SleepFM is non-commercial only. A default build should not be the first thing to raise that question.

Testing with features off

For lsl and audio, only the transport is gated: the LSL ring buffer, source and spooler and their tests build either way, so plain cargo test covers them.

onnx is different. Because it gates the whole inference layer, the manifest, tensorizer and decoding tests — about a hundred — only run with it on:

cargo test                     # everything except inference
cargo test --features onnx     # the full suite

Tests that also need the ONNX Runtime library skip themselves with a printed reason when it is absent, so --features onnx on a machine that has not run runtime/fetch.sh still reports a clean run.