[package]
name = "devalang"
version = "0.0.1-beta.2"
authors = ["Devaloop <contact@devaloop.com>"]
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."
license = "MIT"
repository = "https://github.com/devaloop-labs/devalang"
keywords = ["music", "dsl", "audio", "cli"]
categories = ["command-line-utilities", "development-tools", "parser-implementations"]
readme = "README.md"
homepage = "https://devalang.com"
documentation = "https://docs.devalang.com/"
edition = "2024"

[[bin]]
name = "devalang"
path = "rust/main.rs"

[lib]
name = "devalang_core"
path = "rust/lib.rs"
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = "s"

[features]
default = ["cli"]
cli = ["crossterm", "indicatif", "inquire", "zip", "reqwest", "flate2", "tokio"]

[dependencies]
devalang_types = { path = "rust/types", version = "0.0.3" }
clap = { version = "4.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rodio = "0.17"
hound = "3.4.0"
toml = "0.8"
notify = "6.1"
fs_extra = "1.3"
include_dir = "0.7"
wasm-bindgen = "0.2"
serde-wasm-bindgen = "0.4"
nom_locate = "4.0.0"
chrono = "0.4"
crossterm =  { version = "0.27", optional = true }
indicatif = { version = "0.17", optional = true }
inquire = { version = "0.7.5", optional = true }
js-sys = "0.3"
getrandom = { version = "0.3", features = ["wasm_js"] }
reqwest = { version = "0.12.22", optional = true, features = ["json"] }
flate2 = { version = "1.0", optional = true }
tokio = { version = "1", features = ["full"], optional = true }
zip = { version = "4.3.0", optional = true }
rayon = "1.10.0"
webbrowser = "0.8"
tiny_http = "0.9.0"
dirs = "5"
urlencoding = "2.1"
uuid = { version = "1.18.0", features = ["v4"] }
console_error_panic_hook = "0.1.7"
midly = "0.5.3"

[dev-dependencies]
assert_cmd = "2"
predicates = "2"
tempfile = "3"

# For wasm32, enable wasm-friendly randomness backends and avoid
# pulling in native-only CLI dependencies.
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
uuid = { version = "1.18.0", features = ["v4", "js", "rng-getrandom"] }
# Keep a lightweight linkage to the utils crate for wasm builds without
# enabling native CLI features.
devalang_utils = { path = "rust/utils", default-features = false, version = "0.0.2" }

# devalang_utils with CLI and wasmtime are only needed for native targets.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
devalang_utils = { path = "rust/utils", features = ["cli"], version = "0.0.2" }
wasmtime = "19"
