devalang 0.1.6

Write music with code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text.
Documentation
[package]

name = "devalang"

version = "0.1.6"

edition = "2024"

description = "Write music with code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text."

repository = "https://github.com/devaloop-labs/devalang"

license = "MIT"

readme = "README.md"

homepage = "https://devalang.com"

documentation = "https://docs.devalang.com/"

authors = ["Labscend Studios <hello@labscend.studio>"]



[[bin]]

name = "devalang"

path = "src/rust/bin/devalang.rs"

required-features = ["cli"]



[lib]

name = "devalang_wasm"

path = "src/rust/lib.rs"

crate-type = ["cdylib", "rlib"]



[features]

default = ["cli"]

cli = ["dep:clap", "dep:crossterm", "dep:tokio", "dep:notify", "dep:toml", "dep:time", "dep:rodio", "dep:inquire", "dep:atty", "dep:hound", "dep:midly", "dep:midir", "dep:tiny_http", "dep:webbrowser", "dep:wasmtime", "dep:reqwest", "dep:dirs", "dep:zip", "dep:urlencoding", "dep:flate2", "dep:tar", "dep:rand", "dep:mp3lame-encoder", "uuid/v4"]

wasm = ["dep:js-sys", "dep:web-sys", "dep:wasm-bindgen-futures", "dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:getrandom", "getrandom/js", "dep:rand", "dep:hound", "dep:midly", "dep:toml", "uuid/js", "dep:reqwest", "dep:dirs", "dep:zip", "dep:urlencoding", "dep:flate2", "dep:tar"]

plugin = ["dep:paste"]



# Internal feature to disable wasm-specific code when compiling plugins

# This is automatically enabled when compiling for wasm32 without the "wasm" feature

plugin-only = []



[dependencies]

# Core dependencies (always available)

thiserror = "1.0"

anyhow = "1.0"

regex = "1.10"

serde = { version = "1.0", features = ["derive"] }

serde_json = { version = "1.0" }

async-trait = "0.1"

once_cell = "1.19"

rayon = "1.10"

paste = { version = "1.0", optional = true }



# Random number generation (optional)

rand = { version = "0.8", optional = true }

getrandom = { version = "0.2", optional = true }



# WASM-bindgen dependencies (only for WASM feature)

wasm-bindgen = { version = "0.2", optional = true }

serde-wasm-bindgen = { version = "0.4", optional = true }



# CLI-only dependencies (not compatible with WASM)

clap = { version = "4.5", features = ["derive"], optional = true }

crossterm = { version = "0.27", optional = true }

notify = { version = "6.1", optional = true }

tokio = { version = "1.38", features = ["rt-multi-thread", "macros", "time", "sync", "signal"], optional = true }

hound = { version = "3.5", optional = true }

time = { version = "0.3", features = ["macros", "formatting"], optional = true }

toml = { version = "0.8", optional = true }

wasmtime = { version = "26.0", optional = true }

rodio = { version = "0.17", default-features = false, features = ["wav", "flac", "mp3"], optional = true }

inquire = { version = "0.5", optional = true }

midly = { version = "0.5", optional = true }

midir = { version = "0.9", optional = true }

atty = { version = "0.2", optional = true }

reqwest = { version = "0.12.23", features = ["json"], optional = true }

dirs = { version = "6.0.0", optional = true }

zip = { version = "5.1.1", default-features = false, features = ["deflate"], optional = true }

tiny_http = { version = "0.12.0", optional = true }

webbrowser = { version = "1.0.5", optional = true }

urlencoding = { version = "2.1", optional = true }

flate2 = { version = "1.1.2", optional = true }

tar = { version = "0.4.44", optional = true }



# WASM-only dependencies

js-sys = { version = "0.3", optional = true }

web-sys = { version = "0.3", features = ["console", "Window", "Request", "RequestInit", "Response"], optional = true }

wasm-bindgen-futures = { version = "0.4", optional = true }



# UUID with different features for CLI and WASM

uuid = { version = "1.18.1", default-features = false }



# Audio encoding for multi-format export

# LAME bindings are C-based and not compatible with WASM. Make optional and enabled

# only for native/CLI builds via the `cli` feature.

mp3lame-encoder = { version = "0.2", optional = true }



[dev-dependencies]

tempfile = "3.8"