Feature flags
The open-stomp crate's Cargo features: what each one adds, what it pulls in, and how to turn them off. All three are on by default.
The features
| Feature | Default | Adds | Pulls in |
|---|---|---|---|
device | On | open_stomp::device: the connection engine (port scan, auto-connect, startup sync, request pacing, edits, uploads, capture replay) | midir (ALSA on Linux, CoreMIDI on macOS, WinMM on Windows); core-foundation-sys on macOS |
ble | On | Bluetooth LE MIDI: the engine also finds and connects to the pedal wirelessly (Bluetooth). Turns on device | btleplug (CoreBluetooth, BlueZ, WinRT), tokio, futures-util, uuid |
nam | On | open_stomp::nam: load, run and convert .nam models; ir::convert_optimised and ir::Method::Optimised; Device::import_nam_file* | serde_json, rustfft |
Without any of them you get the protocol layer alone: parsing, building and state tracking, with no I/O and no dependencies.
Choosing features
toml
[dependencies]
open-stomp = { git = "https://github.com/JackMechem/open-stomp-lib", tag = "v0.7.0" }toml
[dependencies]
open-stomp = { git = "https://github.com/JackMechem/open-stomp-lib", tag = "v0.7.0", default-features = false }toml
[dependencies]
open-stomp = { git = "https://github.com/JackMechem/open-stomp-lib", tag = "v0.7.0", default-features = false, features = ["device", "nam"] }toml
[dependencies]
open-stomp = { git = "https://github.com/JackMechem/open-stomp-lib", tag = "v0.7.0", default-features = false, features = ["nam"] }What each build has
| No features | nam | device | device + ble | |
|---|---|---|---|---|
pack, midi, catalog, records, state, queue, upload, capture, blemidi | Yes | Yes | Yes | Yes |
ir (WAV, resampling, the official conversion) | Yes | Yes | Yes | Yes |
ir::convert_optimised | Yes | |||
nam | Yes | |||
device::Device | Yes | Yes | ||
Device::import_nam_file* | With nam | With nam | ||
Device::import_ir_file default | Official conversion (optimised with nam) | Same | ||
| Bluetooth pedal | Yes |
Config::bluetoothexists with or withoutble, but is ignored without it.Device::import_ir_fileuses the optimised conversion whennamis on, and the official one otherwise.
System requirements
| Feature | Linux | macOS, Windows |
|---|---|---|
device | ALSA headers: libasound2-dev (Debian/Ubuntu), alsa-lib-devel (Fedora) | Nothing |
ble | D-Bus headers: libdbus-1-dev / dbus-devel; BlueZ at run time | Nothing (macOS asks for Bluetooth permission on first use) |
nam | Nothing | Nothing |
Rust 1.88 or newer for all of them.
Examples and features
Some examples need a feature:
| Example | Needs |
|---|---|
monitor, ports | device |
ble_check | ble |
nam_convert, nam_check, nam_optimise, nam_render, nam_level, ir_compare | nam |
decode, ir_check, ir_capture_check, ir_test_files | Nothing |
Python
The Python package is built with every feature: the engine, Bluetooth and NAM conversion are always there. On Linux, building it from source needs both the ALSA and D-Bus headers.
API docs
The Rust API reference is built with all features on. Locally, cargo doc --open builds it with the features you have enabled.
