mirror of
https://github.com/storytold/soundcraft.git
synced 2026-10-26 03:26:49 -06:00
Adds a Windows implementation of the editor host window: a top-level HWND owned by the app's active window (no taskbar button), sized from the view's rect, resized on IPlugFrame::resizeView, hidden on close and torn down by the editor link's idle like on macOS. The main thread is the one Rust names "main", where the app runs its message loop. Also fixes two Windows-only build problems that kept the VST3 tests from running there: the fixture's bus flags (the vst3 bindings use i32 enums with MSVC) and an unused variable in a unix-only test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
2.0 KiB
TOML
61 lines
2.0 KiB
TOML
[package]
|
|
name = "soundcraft-vst3-host"
|
|
description = "SoundCraft VST3 plugin host: scans, loads and runs third-party VST3 plugins behind the safe soundcraft-dsp Plugin trait (an isolated unsafe FFI crate)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
soundcraft-dsp.workspace = true
|
|
serde.workspace = true
|
|
thiserror.workspace = true
|
|
log.workspace = true
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
vst3 = "0.3"
|
|
libloading = "0.8"
|
|
|
|
# The macOS editor host window (an NSWindow whose content view the plugin's IPlugView attaches to).
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
objc2 = "0.6"
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSGeometry", "NSString"] }
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSApplication", "NSResponder", "NSView", "NSWindow", "NSGraphics"] }
|
|
|
|
# The Windows editor host window (a top-level HWND the plugin view's child window lives in).
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_System_LibraryLoader", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_WindowsAndMessaging"] }
|
|
|
|
[[test]]
|
|
name = "editor_main_thread"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "module_exit"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "module_exit_live_instance"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "module_exit_worker_thread"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "module_exit_shutdown"
|
|
harness = false
|
|
|
|
# An isolated unsafe helper crate (craftrules never-crash), like soundcraft-clap-host: this crate
|
|
# opts out of the workspace `unsafe_code = "forbid"` for itself only. It denies unsafe everywhere
|
|
# and allows it solely on the FFI module (`src/ffi.rs`). The rest mirrors `[workspace.lints]`.
|
|
[lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[lints.clippy]
|
|
dbg_macro = "warn"
|
|
todo = "warn"
|
|
too_many_arguments = "allow"
|
|
type_complexity = "allow"
|