strudel-rs 0.1.1

Feature-selectable facade for the strudel-rs workspace libraries
Documentation
strudel-rs-0.1.1 has been yanked.

strudel-rs

Crates.io Documentation

Project homepage: https://nukleas.codeberg.page/strudel-rs

strudel-rs is an optional facade crate for the reusable Rust libraries in this workspace. It re-exports each crate under its own module, so imports stay namespaced and similarly named public types do not collide.

use strudel_rs::{core, dsl, mini};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let output = dsl::execute(r#"note("c4 e4 g4")"#)?;
    let pattern: core::Pattern = output.pattern;
    let parsed = mini::parse("bd sd")?;
    Ok(())
}

Installation

Add to your Cargo.toml and select the namespaces you need.

Examples

Mini notation only:

strudel-rs = { version = "0.1", features = ["mini"] }

Full DSL parsing and evaluation:

strudel-rs = { version = "0.1", features = ["dsl"] }

General MIDI definitions without the parser or HTTP loader:

strudel-rs = { version = "0.1", features = ["soundfont-gm"] }

WebAudioFont parser without its HTTP loader:

strudel-rs = { version = "0.1", features = ["soundfont-parser"] }

The crate has no default features. Each enabled facade feature makes its module available; features also enable public prerequisite namespaces where appropriate.

For example, dsl enables mini and core, and audio exposes the core, DSP, sound, soundfont, music-theory, and PCM modules used by the native audio API.

Features

Feature Module or effect
core core and music_theory for core's public pitch/scale APIs
mini mini; also enables core and its prerequisites
mini-audio Enables mini plus its source crate's optional native-audio feature
dsl dsl; also enables mini and core
dsl-audio Enables dsl plus its source crate's optional native-audio feature
dsp dsp and pcm
audio audio and the namespaces required by native playback
pcm / pcm-decode pcm; optionally enables codec decoding
sounds / sounds-http sounds plus dsp, pcm-decode, music_theory; -http adds HTTP
sounds-bundled-samples Forwards the reserved bundled-samples feature
soundfont-gm soundfont with General MIDI definitions
soundfont-parser Enables GM definitions and WebAudioFont parsing
soundfont-http Enables parser plus HTTP loading/caching
soundfont-all Forwards the source crate's all feature
music-theory / music-theory-serde music_theory, optionally with serde support
midi-to-strudel midi_to_strudel and its public prerequisite namespaces
markov markov and MIDI/music-theory/soundfont prerequisites
all Enables every library module and optional feature in this facade

Cargo features are additive. A facade feature cannot turn off a feature selected transitively by another enabled crate. In particular, the current strudel-audio manifest enables strudel-sounds/http and strudel-soundfont/all; therefore selecting facade audio also enables those capabilities. sounds itself currently depends on strudel-pcm with decode enabled.

The strudio package is intentionally not a facade module: it is a binary-only CLI package and has no library target to re-export. The *-wasm binding crates are also omitted; browser applications should depend on their generated WASM packages directly.

License

AGPL-3.0-or-later. See LICENSE. Copyright and attribution terms are in the repository README.

Links