[package]
name = "octasine"
version = "0.9.1"
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
license = "AGPL-3.0"
edition = "2021"

[features]
default = ["glow"]
# Enable clap plugin support
clap = ["atomic_refcell", "bytemuck", "clap-sys", "parking_lot"]
# Enable VST2 plugin support
vst2 = ["vst", "parking_lot"]
# Use glow (OpenGL) for graphics
glow = ["gui", "iced_baseview/glow", "iced_audio/glow"]
# Use wgpu for graphics
wgpu = ["gui", "iced_baseview/wgpu", "iced_audio/wgpu"]
# Internal use only
gui = ["iced_baseview/canvas", "iced_audio", "iced_aw", "palette", "raw-window-handle", "rwh06", "rfd", "tinyfiledialogs"]

[lib]
name = "octasine"
crate-type = ["cdylib", "lib"]

[[bench]]
name = "patch_bank_serde"
harness = false

[dev-dependencies]
assert_approx_eq = "1"
criterion = "0.5"
quickcheck = { version = "1", default-features = false }

[dependencies]
ahash = "0.8"
anyhow = "1"
arc-swap = "1"
array-init = "2"
arrayvec = "0.7"
byteorder = "1"
cfg-if = "1"
cbor4ii = { version = "0.3", features = ["serde1", "use_std"] }
compact_str = { version = "0.7", features = ["serde"] }
directories = "5"
duplicate = "1"
fast-math = "0.1"
fastrand = "2"
flate2 = "1"
git-testament = "0.2"
indexmap = { version = "2", features = ["serde"] }
log = { version = "0.4", default-features = false }
log-panics = "2"
memchr = "2"
once_cell = "1"
os_info = "3"
ringbuf = "0.3"
seahash = "4"
semver = { version = "1", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
simplelog = { version = "0.12", default-features = false, features = ["local-offset"] }
sleef-trig = "0.1.0"

# vst2

vst = { version = "0.4", optional = true }

# clap

atomic_refcell = { version = "0.1", optional = true }
bytemuck = { version = "1", optional = true }
clap-sys = { version = "0.3", optional = true }

# vst2 / clap
parking_lot = { version = "0.12", optional = true }

# GUI

iced_audio = { version = "0.12", default-features = false, optional = true }
iced_aw = { version = "0.5", features = ["modal", "card"], optional = true }
palette = { version = "0.6", optional = true }
raw-window-handle = { version = "0.5", optional = true }
rwh06 = { package = "raw-window-handle", version = "0.6", optional = true }
tinyfiledialogs = { version = "3", optional = true }

[dependencies.iced_baseview]
git = "https://github.com/greatest-ape/iced_baseview.git"
rev = "055d88f" # branch octasine-0.9
default-features = false
features = ["canvas"]
optional = true

[target.'cfg(target_os="macos")'.dependencies]
objc = "0.2.7"
rfd = { version = "0.14", optional = true, default-features = false, features = ["xdg-portal"] }

[target.'cfg(target_os="windows")'.dependencies]
rfd = { version = "0.14", optional = true, default-features = false, features = ["xdg-portal"] }