Files
omniget/rust-toolchain.toml
T
Antonio LeandroandClaude Fable 5 85f5457455 fix(plugins): reject ABI/toolchain-incompatible plugins instead of segfaulting
Opening any plugin page in v0.7.1 killed the app with SIGSEGV. Root cause
is not a code change: the host release was built with rustc 1.97.0 (CI
used an unpinned 'stable'), while the published plugins were built with
1.95/1.96. Rust makes no ABI guarantee across compiler releases, so the
dyn OmnigetPlugin vtable and the boxed futures it returns were laid out
differently on each side — the first handle_command call jumped through a
corrupted pointer. v0.7.0 only worked because it happened to share rustc
1.96 with the plugins.

- Bump plugin ABI_VERSION 2 -> 3 so stale plugins are rejected at load,
  before any Rust-ABI call is made (only C-ABI fn() -> u32 touches them).
- export_plugin! now also exports omniget_plugin_build_info() (C string,
  thin pointer) carrying the SDK and rustc versions; the loader requires
  it and demands an exact rustc fingerprint match, catching mismatches
  that a version counter cannot.
- ABI errors now say the plugin must be updated; the existing guard pages
  already render load_error for kind=abi_mismatch.
- Pin the toolchain (rust-toolchain.toml + release.yml) to 1.97.0 so host
  and plugin builds cannot silently diverge again.

Verified: with the three stale plugins installed, the rebuilt app starts,
logs 'not loaded (abi_mismatch)' for each, and no longer crashes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:42:29 -03:00

13 lines
650 B
TOML

# Plugins are dynamic libraries that exchange Rust trait objects with the
# host. Rust guarantees no ABI stability across compiler releases, so a host
# and a plugin built with different rustc versions corrupt vtables and
# segfault at the first plugin call. The loader refuses to load plugins whose
# embedded rustc fingerprint differs from the host's, and this file pins the
# compiler so host and plugin builds agree by construction.
#
# Bumping this version requires rebuilding and re-releasing every plugin in
# tonhowtf/omniget-plugins. Keep it in sync across all plugin repos.
[toolchain]
channel = "1.97.0"
components = ["rustfmt", "clippy"]