The use crate::wrapper::vst3::Vst3Plugin; statement at crates/nih_plug/src/wrapper/vst3/view.rs:17 is gated to #[cfg(target_os = "linux")], but Vst3Plugin is referenced unconditionally throughout the file:
pub(crate) struct WrapperView<P: Vst3Plugin> (line 163)
RunLoopEventHandlerWrapper<P: Vst3Plugin> (lines 156, 158) — present under both cfg(target_os = "linux") and cfg(not(target_os = "linux"))
impl<P: Vst3Plugin> WrapperView<P> (line 211)
impl<P: Vst3Plugin> IPlugView for WrapperView<P> (line 389)
impl<P: Vst3Plugin> IPlugViewContentScaleSupport for WrapperView<P> (line 590)
- a few more
Vst3Plugin bounds elsewhere in the file
On macOS and Windows builds with the default vst3 feature enabled, the import isn't brought into scope and the references fail with cannot find Vst3Plugin in this scope.
The #[cfg(target_os = "linux")] attribute appears to have been copy-pasted from the nearby correctly-Linux-only run-loop import block at lines 132+ during 77f828f8 ("split out nih_plug_core"), where the file was reorganised.
The fix is a one-line removal of the cfg attribute. The file's other Linux-specific gates (the run-loop import block at lines 132+, and gates on individual struct fields and impls that use truly Linux-only types) are correct and stay.
Caught while building a downstream consumer on macOS with default features; after this fix cargo build succeeds on macOS and (per the same code path) Windows.
The `use crate::wrapper::vst3::Vst3Plugin;` statement at [`crates/nih_plug/src/wrapper/vst3/view.rs:17`](https://codeberg.org/BillyDM/nih-plug/src/branch/main/crates/nih_plug/src/wrapper/vst3/view.rs#L17) is gated to `#[cfg(target_os = "linux")]`, but `Vst3Plugin` is referenced unconditionally throughout the file:
- `pub(crate) struct WrapperView<P: Vst3Plugin>` (line 163)
- `RunLoopEventHandlerWrapper<P: Vst3Plugin>` (lines 156, 158) — present under both `cfg(target_os = "linux")` and `cfg(not(target_os = "linux"))`
- `impl<P: Vst3Plugin> WrapperView<P>` (line 211)
- `impl<P: Vst3Plugin> IPlugView for WrapperView<P>` (line 389)
- `impl<P: Vst3Plugin> IPlugViewContentScaleSupport for WrapperView<P>` (line 590)
- a few more `Vst3Plugin` bounds elsewhere in the file
On macOS and Windows builds with the default `vst3` feature enabled, the import isn't brought into scope and the references fail with `cannot find Vst3Plugin in this scope`.
The `#[cfg(target_os = "linux")]` attribute appears to have been copy-pasted from the nearby correctly-Linux-only run-loop import block at lines 132+ during [`77f828f8`](https://codeberg.org/BillyDM/nih-plug/commit/77f828f8) ("split out nih_plug_core"), where the file was reorganised.
The fix is a one-line removal of the cfg attribute. The file's other Linux-specific gates (the run-loop import block at lines 132+, and gates on individual struct fields and impls that use truly Linux-only types) are correct and stay.
Caught while building a downstream consumer on macOS with default features; after this fix `cargo build` succeeds on macOS and (per the same code path) Windows.