-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
134 lines (114 loc) · 5.84 KB
/
Copy pathCargo.toml
File metadata and controls
134 lines (114 loc) · 5.84 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
[workspace]
members = ["xtask"]
[package]
name = "niner"
version = "1.0.2"
edition = "2021"
license = "GPL-3.0-or-later"
description = "Kick drum synthesizer plugin"
authors = ["Hyperfocus DSP <hello@hyperfocusdsp.com>"]
homepage = "https://hyperfocusdsp.com"
repository = "https://github.com/hyperfocusdsp/niner"
[features]
# Default release builds ship without the layout editor: the 1054-line
# drag/select/save panel surface is excluded from the binary. Built-in
# layouts come from `assets/baked_layout.json` via `include_bytes!`,
# so dev-tuned positions still ship — just locked at build time.
default = []
# Enable for layout-tuning dev builds:
# cargo run --release --features layout_editor --bin niner-standalone
# When set, the editor compiles in, NINER_LAYOUT_EDITOR=1 + Alt+L work,
# Save layout writes to <niner-data>/layout_overrides.json, and that
# file is overlaid on top of the baked JSON at startup so iterative
# tweaks don't require a rebuild. Run `cargo xtask lock-layout` to
# copy your saved JSON into the baked asset before tagging a release.
layout_editor = []
[lib]
# `cdylib` for VST3/CLAP bundles; `rlib` so the `niner-standalone` binary
# can link against the same lib (no duplicated module trees).
crate-type = ["cdylib", "rlib"]
[[bin]]
name = "niner-standalone"
path = "src/main.rs"
[dependencies]
# Plugin framework — pinned to a specific commit for reproducible builds.
# Hornfisk/nih-plug tracks upstream robbert-vdh@28b149e plus a single-line
# change exposing `EguiState::set_requested_size` (private upstream) so the
# UI-scale control can drive a programmatic window resize in-DAW. See
# https://github.com/Hornfisk/nih-plug/tree/niner/pub-set-requested-size
nih_plug = { git = "https://github.com/Hornfisk/nih-plug", rev = "8b51e93a707cb6226721b56825047322e8a8e623", features = ["assert_process_allocs", "standalone"] }
nih_plug_egui = { git = "https://github.com/Hornfisk/nih-plug", rev = "8b51e93a707cb6226721b56825047322e8a8e623" }
# Real-time safety
rtrb = "0.3"
# FFT for the OUTPUT-display spectrum analyzer. Thin wrapper over rustfft
# that takes real-valued input directly (audio is real) and pre-plans the
# transform at `initialize()`, so `process()` allocates nothing.
realfft = "3.5"
# Concurrency
parking_lot = "0.12"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
# Cross-platform data directories
directories = "5"
# Audio file writing (one-shot export / bounce).
hound = "3"
# Native file-save dialog for the BOUNCE button. Default features give the
# synchronous API (gtk3 backend on Linux, Cocoa on macOS, Win32 on Windows) —
# save_file() blocks the GUI thread briefly, which is fine because the user
# is actively waiting and audio runs on its own thread.
rfd = "0.14"
# PNG decoding for the header logo (one-time decode at editor startup).
image = { version = "0.25", default-features = false, features = ["png"] }
# RNG for the DICE randomize feature (GUI thread only).
rand = "0.8"
# Footer "feedback" link — opens the user's mail client with a pre-filled
# mailto: when clicked. webbrowser abstracts xdg-open/open/start across
# platforms; urlencoding handles the body's percent-encoding.
webbrowser = "0.8"
urlencoding = "2.1"
# Windows-only: direct cpal access so the standalone can probe the default
# output device and pass matching --sample-rate / --period-size to nih-plug.
# Without this, nih-plug's hardcoded defaults (48 kHz / 512) mismatch WASAPI
# on many Windows systems and the backend falls back to the dummy sink.
# cpal is already transitive via nih-plug; this just exposes it directly.
#
# winapi is also already transitive (via baseview) — declaring it here just
# gives us `GetAsyncKeyState` / foreground-window checks so the standalone
# can detect T/Space presses that nih-plug's outer WindowHandler swallows.
# See `src/win_keys.rs` for the rationale.
[target.'cfg(target_os = "windows")'.dependencies]
cpal = "0.15"
winapi = { version = "0.3", features = ["winuser", "processthreadsapi"] }
[profile.release]
lto = "thin"
strip = "symbols"
# Force both baseview pins (via nih-plug and via egui-baseview) to a newer
# master that includes RustAudio/baseview#212 — "Implement keyboard event
# hook on Windows". The pinned nih-plug commit predates this fix, so
# standalone Windows builds receive zero keyboard events (confirmed via
# empty `[keyboard]` diagnostic in niner.log). The PR is a pure add
# (new `src/win/hook.rs` + two field additions to `WindowState`) with no
# public API change, so both dependents continue to compile unchanged.
#
# Cargo requires the patch source to be a different URL than the one
# being patched, so we pin to a fork at Hornfisk/baseview that tracks
# `RustAudio/baseview@master` (commit 237d323).
# Upstream fix: https://github.com/RustAudio/baseview/pull/212
[patch."https://github.com/RustAudio/baseview.git"]
baseview = { git = "https://github.com/Hornfisk/baseview.git", rev = "237d323c729f3aa99476ba3efa50129c5e86cad3" }
# egui-baseview, patched to respect egui's `zoom_factor`. Upstream 0.5.0
# (BillyDM/egui-baseview@ec70c3f) derives pixels-per-point from the
# WindowScalePolicy alone and uses it for layout, tessellation, and pointer
# input — so `Context::set_zoom_factor` is silently ignored and an in-DAW UI
# scale resizes the window without scaling the content. The fork composes the
# native scale factor with `zoom_factor` (matching egui-winit) so
# `set_zoom_factor` scales the UI here too; it is bit-for-bit identical at the
# default zoom of 1.0. Pinned to the egui-0.31 base niner uses; the upstream
# PR (against main / egui 0.33) is tracked separately and this pin can drop if
# it lands.
[patch."https://github.com/BillyDM/egui-baseview.git"]
egui-baseview = { git = "https://github.com/Hornfisk/egui-baseview.git", rev = "56fc8194de44261034ad4afe3f2b1c3ce5adbff7" }