Skip to content

Migrate iced_baseview to upstream RustAudio 0.4.0 and retire our fork #285

Description

@OpenSauce

Current state

rustortion-plugin/Cargo.toml:13 pins our own fork by commit:

iced_baseview = { git = "https://github.com/OpenSauce/iced_baseview.git", rev = "2377031b" }

Do this first: that pin is the Windows crash

2377031b is the iced 0.13 → 0.14 upgrade commit, which predates the Win32 HINSTANCE fix. On that rev, convert_raw_window_handle has an inverted null guard that unwraps NonZeroIsize::new(0) on every Win32 window baseview hands over. In a plugin the panic crosses the extern "C" boundary, becomes a non-unwinding panic, and aborts the host — surfacing on Windows as exception 0xc0000409 with the plugin as the faulting module.

One-line interim fix, independent of this migration:

iced_baseview = { git = "https://github.com/OpenSauce/iced_baseview.git", tag = "v0.1.0" }

Why migrate

  • BillyDM/iced_baseview, our fork's parent, is archived on GitHub (last push 2026-04-17).
  • The project moved to https://codeberg.org/RustAudio/iced_baseview under the RustAudio org on 2026-06-04 and is actively released: six versions between 2026-05-25 and 2026-07-14, landing on 0.4.0.
  • iced_baseview 0.4.0 is on crates.io and already targets iced 0.14, the same upgrade our fork did by hand.
  • It depends on baseview ^0.2.1 and raw-window-handle ^0.6 with no git dependencies, so this becomes a plain versioned crates.io dep.

The HINSTANCE bug cannot occur upstream. With no raw-window-handle 0.5 there is no 0.5 → 0.6 conversion layer to get wrong, and baseview 0.2.2 sets the field itself (src/platform/win/mod.rs:27, via HInstance::get_from_dll().addr(), which reads the HINSTANCE from the DLL module rather than the window).

Net effect: the fork's only two unique commits (the iced 0.14 port and the HINSTANCE fix) are both redundant upstream, and src/conversion.rs — 848 of the fork's 2506 source lines — stops needing to exist.

Work required

Blast radius is one file: rustortion-plugin/src/editor.rs (236 lines, 24 iced_baseview references). Nothing else in the workspace imports it.

The real change is the trait model. iced 0.14 replaced Application with Program, and 0.4.0 followed:

  • 0.4.0 has no Application trait. editor.rs:131, impl iced_baseview::Application for PluginApp, must be rewritten against Program.
  • open_parented still exists, re-exported from shell.
  • Settings and IcedBaseviewSettings still exist; IcedBaseviewSettings moved to shell::settings.
  • Task, executor, and window modules survive.

rustortion-ui already depends on iced = "0.14" directly, so the widget code should carry over unchanged.

Dependency jumps to expect: keyboard-types 0.6 → 0.8.3, thiserror 1 → 2, window_clipboard 0.4 → 0.5, sysinfo 0.30 → 0.39.6.

Unknowns

  • Exact open_parented signature in 0.4.0 and how Program is parameterised. Needs reading against the real source, not docs summaries.
  • Whether nih-plug's editor lifetime expectations still fit the Program model, particularly the Send wrapper around WindowHandle<M> at editor.rs:26-32.
  • Whether baseview 0.2.x changes parented-window behaviour in any host we care about.

Acceptance criteria

  • rustortion-plugin depends on iced_baseview = "0.4" from crates.io, no git dependency
  • Plugin builds on Linux and Windows
  • VST3 and CLAP both load and render the editor in a host
  • No host abort on Windows
  • OpenSauce/iced_baseview archived once nothing depends on it

Refs: OpenSauce/iced_baseview#1 (the HINSTANCE fix), tag v0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency filediscoveryResearch on a topic is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions