strudel-rs 0.2.0

Feature-selectable facade for the strudel-rs workspace libraries
Documentation
# strudel-rs

[![Codeberg](https://img.shields.io/badge/codeberg-nukleas%2Fstrudel--rs-2185d0?logo=codeberg&logoColor=white)][Repository]
[![Crates.io](https://img.shields.io/crates/v/strudel-rs.svg)][Crates.io]
[![Documentation](https://docs.rs/strudel-rs/badge.svg)][Documentation]
[![License: AGPL-3.0-or-later](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue.svg)][LICENSE]
[![MSRV](https://img.shields.io/badge/rustc-1.98.1+-orange.svg)][Repository]
[![Homepage](https://img.shields.io/badge/homepage-strudel--rs-blue)][Homepage]

`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.

```rust
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:

```toml
strudel-rs = { version = "0.2", features = ["mini"] }
```

Full DSL parsing and evaluation:

```toml
strudel-rs = { version = "0.2", features = ["dsl"] }
```

General MIDI definitions without the parser or HTTP loader:

```toml
strudel-rs = { version = "0.2", features = ["soundfont-gm"] }
```

WebAudioFont parser without its HTTP loader:

```toml
strudel-rs = { version = "0.2", 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](https://codeberg.org/nukleas/strudel-rs#license-copyright).

## Links

- [Repository]
- [Homepage]
- [Strudel Official Site]
- [Strudel Documentation]
- [Mini Notation Reference]

[Repository]: https://codeberg.org/nukleas/strudel-rs
[Homepage]: https://nukleas.codeberg.page/strudel-rs
[Crates.io]: https://crates.io/crates/strudel-rs
[Documentation]: https://docs.rs/strudel-rs
[LICENSE]: https://codeberg.org/nukleas/strudel-rs/src/branch/main/LICENSE
[Strudel Official Site]: https://strudel.cc/
[Strudel Documentation]: https://strudel.cc/learn/
[Mini Notation Reference]: https://strudel.cc/learn/mini-notation