devalang 0.1.2

Write music like 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.2"
edition = "2024"
description = "Write music like 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-file = "LICENSE"
readme = "README.md"
homepage = "https://devalang.com"
documentation = "https://docs.devalang.com/"
authors = ["Devaloop <contact@devaloop.com>"]

[[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:tiny_http", "dep:webbrowser"]
wasm = ["dep:js-sys", "dep:web-sys", "dep:wasm-bindgen-futures", "dep:hound", "dep:midly", "dep:toml"]

[dependencies]
# Core dependencies (always available)
thiserror = "1.0"
anyhow = "1.0"
regex = "1.10"
rand = { version = "0.8", features = ["getrandom"] }
getrandom = { version = "0.2", features = ["js"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
async-trait = "0.1"
once_cell = "1.19"
wasm-bindgen = { version = "0.2" }
serde-wasm-bindgen = { version = "0.4" }
rayon = "1.10"

# 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"], optional = true }
hound = { version = "3.5", optional = true }
time = { version = "0.3", features = ["macros", "formatting"], optional = true }
toml = { version = "0.8", 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 }
atty = { version = "0.2", optional = true }
reqwest = { version = "0.12.23", features = ["json"] }
dirs = "6.0.0"
zip = { version = "5.1.1", default-features = false, features = ["deflate"] }
tiny_http = { version = "0.12.0", optional = true }
webbrowser = { version = "1.0.5", optional = true }
urlencoding = "2.1"

# 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 = { version = "1.18.1", features = ["v4", "js"] }
flate2 = "1.1.2"
tar = "0.4.44"

# Audio encoding for MP3/FLAC
# Note: For now, we'll implement MP3/FLAC via symphonia or external tools
# Full encoding support coming in future versions

[dev-dependencies]
tempfile = "3.8"