Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
181 lines (157 loc) · 6.42 KB
/
Copy pathCargo.toml
File metadata and controls
181 lines (157 loc) · 6.42 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[package]
name = "nih_plug"
version = "0.0.0"
edition = "2021"
rust-version = "1.80"
links = "nih_plug_cocoaui"
authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"]
license = "ISC"
keywords = ["audio", "plugin", "vst", "vst3"]
description = "A simple but modern API-agnostic audio plugin framework"
repository = "https://github.com/robbert-vdh/nih-plug"
[workspace]
resolver = "2"
members = [
"nih_plug_derive",
"nih_plug_egui",
"nih_plug_iced",
"nih_plug_vizia",
"nih_plug_xtask",
"cargo_nih_plug",
"xtask",
"plugins/examples/byo_gui_gl",
"plugins/examples/byo_gui_softbuffer",
"plugins/examples/byo_gui_wgpu",
"plugins/examples/gain",
"plugins/examples/gain_gui_egui",
"plugins/examples/gain_gui_iced",
"plugins/examples/gain_gui_vizia",
"plugins/examples/midi_inverter",
"plugins/examples/poly_mod_synth",
"plugins/examples/sine",
"plugins/examples/stft",
"plugins/examples/sysex",
"plugins/soft_vacuum",
"plugins/buffr_glitch",
"plugins/crisp",
"plugins/crossover",
"plugins/diopser",
"plugins/loudness_war_winner",
"plugins/puberty_simulator",
"plugins/safety_limiter",
"plugins/spectral_compressor",
]
[features]
default = ["vst3"]
# Enabling this feature will cause the plugin to terminate when allocations
# occur in the processing function during debug builds. Keep in mind that panics
# may also allocate if they use string formatting, so temporarily disabling this
# feature may be necessary when debugging panics in DSP code.
assert_process_allocs = ["dep:assert_no_alloc"]
# Enables an export target for standalone binaries through the
# `nih_export_standalone()` function. Disabled by default as this requires
# building additional dependencies for audio and MIDI handling.
standalone = ["dep:baseview", "dep:clap", "dep:cpal", "dep:jack", "dep:midir", "dep:rtrb"]
# Enables the `nih_export_vst3!()` macro. Enabled by default. This feature
# exists mostly for GPL-compliance reasons, since even if you don't use the VST3
# wrapper you might otherwise still include a couple (unused) symbols from the
# `vst3-sys` crate.
vst3 = ["dep:vst3-sys"]
# Enables the `nih_export_au!()` macro for Apple Audio Unit (AUv2) plugins on macOS.
# Builds AudioComponentPlugInInterface vtable + Cocoa view (objc2-app-kit).
au = ["dep:au-sys", "dep:objc2", "dep:objc2-foundation", "dep:objc2-app-kit"]
# Add adapters to the Buffer object for reading the channel data to and from
# `std::simd` vectors. Requires a nightly compiler.
simd = []
# Compress plugin state using the Zstandard algorithm. Loading uncompressed
# state is still supported so existing state will still load after enabling this
# feature for a plugin, but it can not be disabled again without losing state
# compatibility.
zstd = ["dep:zstd"]
# Only relevant when generating docs, adds the `doc_auto_cfg` nightly feature
docs = []
[dependencies]
nih_plug_derive = { path = "nih_plug_derive" }
anyhow = "1.0"
anymap3 = "1.0.1"
atomic_float = "0.1"
atomic_refcell = "0.1"
backtrace = "0.3.65"
bitflags = "1.3"
cfg-if = "1.0"
# This supports CLAP 1.2.2
clap-sys = { git = "https://github.com/micahrj/clap-sys.git", rev = "25d7f53fdb6363ad63fbd80049cb7a42a97ac156" }
crossbeam = "0.8"
log = { version = "0.4", features = ["std", "release_max_level_info"] }
midi-consts = "0.1"
nih_log = "0.3.1"
parking_lot = "0.12"
raw-window-handle = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
widestring = "1.0.0-beta.1"
# Used for the `assert_process_allocs` feature
assert_no_alloc = { git = "https://github.com/robbert-vdh/rust-assert-no-alloc.git", branch = "feature/nested-permit-forbid", features = ["backtrace", "log"], optional = true }
# Used for the `standalone` feature
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
# some crates do use it and others don't
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "579130ecb4f9f315ae52190af42f0ea46aeaa4a2", features = ["opengl"], optional = true }
# All the claps!
clap = { version = "4.1.8", features = ["derive", "wrap_help"], optional = true }
cpal = { version = "0.15", optional = true }
jack = { version = "0.11.4", optional = true }
midir = { version = "0.9.1", optional = true }
rtrb = { version = "0.2.2", optional = true }
# Used for the `vst3` feature
vst3-sys = { git = "https://github.com/robbert-vdh/vst3-sys.git", branch = "fix/drop-box-from-raw", optional = true }
# Used for the `zstd` feature
zstd = { version = "0.12.3", optional = true }
[dev-dependencies]
approx = "0.5.1"
# Used for the Linux event loop, and by the standalone wrapper's SIGINT handling on all Unices
[target.'cfg(target_family = "unix")'.dependencies]
libc = "0.2.124"
[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2.7"
core-foundation = "0.9.3"
# Used for the `au` feature (Apple Audio Unit v2 plugin wrapper).
au-sys = { version = "0.1", optional = true }
objc2 = { version = "0.6", optional = true }
objc2-foundation = { version = "0.3", optional = true }
objc2-app-kit = { version = "0.3", optional = true }
[build-dependencies]
cc = { version = "1.0", optional = false }
[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.44"
features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_UI_WindowsAndMessaging",
"Win32_System_Console",
"Win32_System_LibraryLoader",
"Win32_System_Performance",
]
[profile.release]
lto = "thin"
strip = "symbols"
[profile.profiling]
inherits = "release"
debug = true
strip = "none"
# AUD-379: baseview patched to guard against null BASEVIEW_STATE_IVAR in
# become_first_responder / resign_first_responder. The crash happens when
# an AU host calls uiViewForAudioUnit:withSize: on a parent view that is
# already attached to a window: addSubview: fires viewWillMoveToWindow which
# calls makeFirstResponder before WindowState has been stored in the ivar.
#
# Pinned by commit rather than to the vendor/baseview gitlink: that gitlink had
# no .gitmodules entry and its only remote was a local cargo cache directory,
# so cargo could not fetch this repo as a git dependency at all
# ("no URL configured for submodule 'vendor/baseview'"). The fork now carries
# the same patch in a form any clone can resolve. AUD-660's 60 Hz frame-clock
# retune rides on the same commit.
[patch."https://github.com/RustAudio/baseview.git"]
baseview = { git = "https://github.com/Intrect-io/baseview.git", rev = "11cb5d195309a3d76bde73c31da984445f175d19" }
[[example]]
name = "au_property_notification_lifetime"
required-features = ["au"]