# SPDX-FileCopyrightText: The djio authors # SPDX-License-Identifier: MPL-2.0 [package] name = "djio" description = "DJ Hardware Control(ler) Support" version = "0.0.19" license = "MPL-2.0" readme = "README.md" repository = "https://github.com/uklotzde/djio" keywords = ["dj", "controller", "midi", "hid"] categories = ["hardware-support"] rust-version = "1.75" edition = "2021" include = ["/src", "/README.md", "/LICENSES"] [dependencies] anyhow = "1.0.79" derive_more = "0.99.17" float-cmp = "0.9.0" futures-core = { version = "0.3.30", default-features = false } futures-util = { version = "0.3.30", default-features = false, features = ["std"] } # TODO: Replace with std when available. # Tracking issue for RFC 2351: is_sorted = "0.1.1" log = "0.4.20" strum = { version = "0.25.0", features = ["derive"] } thiserror = "1.0.56" # Optional dependencies discro = { version = "0.28.1", optional = true } midir = { version = "0.9.1", optional = true } tokio = { version = "1.35.1", default-features = false, optional = true } # Optional dependencies (experimental features) crossbeam-utils = { version = "0.8.18", optional = true } enum-as-inner = { version = "0.6.0", optional = true } # Target dependent dependencies [target.'cfg(not(target_family = "wasm"))'.dependencies] hidapi = { version = "2.4.1", optional = true } [dev-dependencies] anyhow = "1.0.79" hidapi = "2.4.1" pretty_env_logger = "0.5.0" [features] # All cross-platform features are enabled by default. default = [ "all-controllers", "midir", "blinking-led-task-tokio-rt", "controller-thread", ] midi = [] midir = ["dep:midir"] jack = ["midir?/jack"] hid = ["dep:hidapi"] blinking-led-task = ["dep:discro", "discro/tokio", "dep:tokio", "tokio/time"] blinking-led-task-tokio-rt = ["blinking-led-task", "tokio/rt"] controller-thread = ["dep:tokio", "tokio/rt", "tokio/time"] # Controller support features # TODO: Extract each controller into a separate crate after the API has settled. all-controllers = ["midi-controllers", "hid-controllers"] # MIDI controllers midi-controllers = ["denon-dj-mc6000mk2", "korg-kaoss-dj", "pioneer-ddj-400"] denon-dj-mc6000mk2 = ["midi"] korg-kaoss-dj = ["midi"] pioneer-ddj-400 = ["midi"] # HID controllers hid-controllers = ["ni-traktor-kontrol-s4mk3"] ni-traktor-kontrol-s4mk3 = ["hid"] # Experimental features experimental-param = ["dep:crossbeam-utils", "dep:enum-as-inner"] [lints.rust] future_incompatible = "warn" let_underscore = "warn" missing_debug_implementations = "warn" rust_2018_idioms = "warn" rust_2021_compatibility = "warn" unreachable_pub = "warn" unsafe_code = "warn" unused = "warn" [lints.clippy] pedantic = "warn" clone_on_ref_ptr = "warn" missing_const_for_fn = "warn" self_named_module_files = "warn" # Repetitions of module/type names occur frequently when using many # modules for keeping the size of the source files handy. Often # types have the same name as their parent module. module_name_repetitions = "allow" # Repeating the type name in `Default::default()` expressions # is not needed as long as the context is obvious. default_trait_access = "allow" # The error types returned should be self-explanatory. missing_errors_doc = "allow" [[example]] name = "midi-dj-controller-hotplug" path = "examples/midi_dj_controller_hotplug.rs" required-features = ["midi-controllers", "midir"] [[example]] name = "ni-traktor-kontrol-s4mk3" path = "examples/ni_traktor_kontrol_s4mk3.rs" required-features = ["ni-traktor-kontrol-s4mk3"]