forked from uklotzde/djio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
123 lines (106 loc) · 3.63 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# 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 = ["README.md", "LICENSES", "src/"]
[dependencies]
anyhow = "1.0.86"
derive_more = "0.99.18"
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: <https://github.com/rust-lang/rust/issues/53485>
is_sorted = "0.1.1"
log = "0.4.21"
strum = { version = "0.26.2", features = ["derive"] }
thiserror = "1.0.61"
# Optional dependencies
discro = { version = "0.29.3", optional = true }
midir = { version = "0.10.0", optional = true }
tokio = { version = "1.38.0", default-features = false, optional = true }
# Optional dependencies (experimental features)
crossbeam-utils = { version = "0.8.20", optional = true }
enum-as-inner = { version = "0.6.0", optional = true }
# Target dependent dependencies
[target.'cfg(not(target_family = "wasm"))'.dependencies]
hidapi = { version = "2.6.1", optional = true }
[dev-dependencies]
anyhow = "1.0.86"
hidapi = "2.6.1"
pretty_env_logger = "0.5.0"
[features]
# All cross-platform features are enabled by default.
default = [
"all-controllers",
"midir",
"observables",
"blinking-led-task-tokio-rt",
"controller-thread",
]
midi = []
midir = ["dep:midir"]
jack = ["midir?/jack"]
hid = ["dep:hidapi"]
tokio = ["dep:tokio", "discro?/tokio"]
observables = ["dep:discro"]
blinking-led-task = ["dep:discro", "tokio", "tokio/time"]
blinking-led-task-tokio-rt = ["blinking-led-task", "tokio/rt"]
controller-thread = ["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"
# Workaround for <https://github.com/rust-lang/rust-clippy/issues/12270>
lint_groups_priority = "allow"
# 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"]