Stream: git-wasmtime

Topic: wasmtime / PR #14990 Don't use native signals on Unix tar...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa opened PR #14990 from aofusa:fallback-unsupported-unix-signals to bytecodealliance:main:

On Unix targets where crates/wasmtime/src/runtime/vm/sys/unix/signals.rs has no code for reading and
updating the signal context, such as all NetBSD targets and OpenBSD/aarch64, building wasmtime fails
with compile_error!("unsupported platform").

This changes build.rs to only enable has_native_signals on Unix for the (OS, architecture) pairs
that signals.rs supports. Other Unix targets now build and behave like platforms without native
signals: signals-based traps are turned off, and compiled code performs explicit checks instead.
Nothing changes for targets that build today.

Changes:

Testing

The NetBSD and OpenBSD VMs have Rust 1.96 and 1.94 from their package collections, which are older
than the MSRV, so I used --ignore-rust-version there. With these versions rustc also reports
unfulfilled #[expect(dead_code)] lints in cow.rs and sync_std.rs with
--no-default-features --features runtime,std,pulley; the same warnings appear with Rust 1.96 on
macOS without this change, so they're not related.

I didn't test running on NetBSD x86_64, only the cross check.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa requested cfallin for a review on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa removed the review request for wasmtime-core-reviewers from PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa requested wasmtime-core-reviewers for a review on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa removed the review request for wasmtime-default-reviewers from PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa requested wasmtime-default-reviewers for a review on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:31):

aofusa requested fitzgen for a review on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 10:34):

aofusa edited PR #14990:

Fixes #14991. See also #6962.

On Unix targets where crates/wasmtime/src/runtime/vm/sys/unix/signals.rs has no code for reading and
updating the signal context, such as all NetBSD targets and OpenBSD/aarch64, building wasmtime fails
with compile_error!("unsupported platform").

This changes build.rs to only enable has_native_signals on Unix for the (OS, architecture) pairs
that signals.rs supports. Other Unix targets now build and behave like platforms without native
signals: signals-based traps are turned off, and compiled code performs explicit checks instead.
Nothing changes for targets that build today.

Changes:

Testing

The NetBSD and OpenBSD VMs have Rust 1.96 and 1.94 from their package collections, which are older
than the MSRV, so I used --ignore-rust-version there. With these versions rustc also reports
unfulfilled #[expect(dead_code)] lints in cow.rs and sync_std.rs with
--no-default-features --features runtime,std,pulley; the same warnings appear with Rust 1.96 on
macOS without this change, so they're not related.

I didn't test running on NetBSD x86_64, only the cross check.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 12:45):

aofusa edited PR #14990:

Fixes #14991. See also #6962.

On Unix targets where crates/wasmtime/src/runtime/vm/sys/unix/signals.rs has no code for reading and
updating the signal context, such as all NetBSD targets and OpenBSD/aarch64, building wasmtime fails
with compile_error!("unsupported platform").

This changes build.rs to only enable has_native_signals on Unix for the (OS, architecture) pairs
that signals.rs supports. Other Unix targets now build and behave like platforms without native
signals: signals-based traps are turned off, and compiled code performs explicit checks instead.
Nothing changes for targets that build today.

Changes:

Testing

The NetBSD and OpenBSD VMs have Rust 1.96 and 1.94 from their package collections, which are older
than the MSRV, so I used --ignore-rust-version there. With these versions rustc also reports
unfulfilled #[expect(dead_code)] lints in cow.rs and sync_std.rs with
--no-default-features --features runtime,std,pulley; the same warnings appear with Rust 1.96 on
macOS without this change, so they're not related.

I didn't test running on NetBSD x86_64, only the cross check.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 15:13):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 15:13):

alexcrichton added PR #14990 Don't use native signals on Unix targets without signal context support to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 15:37):

github-merge-queue[bot] removed PR #14990 Don't use native signals on Unix targets without signal context support from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 16:50):

github-actions[bot] added the label wasmtime:docs on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 16:50):

github-actions[bot] added the label wasmtime:api on PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 16:57):

cfallin commented on PR #14990:

Given that NetBSD and OpenBSD both do have POSIX signals and native signal context structs, wouldn't it be preferable to add the support for reading out the signal context?

(See #2980 where I did this for OpenBSD ~5 years ago; I bumped into the other issue you name, the MSRV lag, and ultimately didn't push it forward. But this particular missing bit isn't something we have to cut a corner on IMHO.)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:02):

aofusa updated PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:04):

aofusa edited PR #14990:

Fixes #14991. See also #6962.

On Unix targets where crates/wasmtime/src/runtime/vm/sys/unix/signals.rs has no code for reading and
updating the signal context, such as all NetBSD targets and OpenBSD/aarch64, building wasmtime fails
with compile_error!("unsupported platform").

This changes build.rs to only enable has_native_signals on Unix for the (OS, architecture) pairs
that signals.rs supports. Other Unix targets now build and behave like platforms without native
signals: signals-based traps are turned off, and compiled code performs explicit checks instead.
Nothing changes for targets that build today.

Changes:

Testing

The NetBSD and OpenBSD VMs have Rust 1.96 and 1.94 from their package collections, which are older
than the MSRV, so I used --ignore-rust-version there. With these versions rustc also reports
unfulfilled #[expect(dead_code)] lints in cow.rs and sync_std.rs with
--no-default-features --features runtime,std,pulley; the same warnings appear with Rust 1.96 on
macOS without this change, so they're not related.

I didn't test running on NetBSD x86_64, only the cross check.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:09):

aofusa commented on PR #14990:

Given that NetBSD and OpenBSD both do have POSIX signals and native signal context structs, wouldn't it be preferable to add the support for reading out the signal context?

(See #2980 where I did this for OpenBSD ~5 years ago; I bumped into the other issue you name, the MSRV lag, and ultimately didn't push it forward. But this _particular_ missing bit isn't something we have to cut a corner on IMHO.)

Agreed that reading out the signal context would be the better fix for NetBSD and OpenBSD, and
thanks for the pointer to #2980. I don't plan to work on that myself, though, so I kept this PR to
the build fallback:

#6962 can stay open to track the signal context support.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:11):

aofusa edited PR #14990:

Fixes #14991. See also #6962.

On Unix targets where crates/wasmtime/src/runtime/vm/sys/unix/signals.rs has no code for reading and
updating the signal context, such as all NetBSD targets and OpenBSD/aarch64, building wasmtime fails
with compile_error!("unsupported platform").

This changes build.rs to only enable has_native_signals on Unix for the (OS, architecture) pairs
that signals.rs supports. Other Unix targets now build and behave like platforms without native
signals: signals-based traps are turned off, and compiled code performs explicit checks instead.
Nothing changes for targets that build today.

Changes:

Testing

The NetBSD and OpenBSD VMs have Rust 1.96 and 1.94 from their package collections, which are older
than the MSRV, so I used --ignore-rust-version there. With these versions rustc also reports
unfulfilled #[expect(dead_code)] lints in cow.rs and sync_std.rs with
--no-default-features --features runtime,std,pulley; the same warnings appear with Rust 1.96 on
macOS without this change, so they're not related.

I didn't test running on NetBSD x86_64, only the cross check.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:22):

aofusa commented on PR #14990:

The NetBSD platform check failed in the merge queue because the runner has no C compiler for
NetBSD (needed by capstone-sys). I switched it to cross, as for illumos, and it now passes
with `prtest:platform-checks

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:28):

aofusa edited a comment on PR #14990:

The NetBSD platform check failed in the merge queue because the runner has no C compiler for
NetBSD (needed by capstone-sys). I switched it to cross, as for illumos, and it now passes
with prtest:platform-checks.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:30):

aofusa edited a comment on PR #14990:

Given that NetBSD and OpenBSD both do have POSIX signals and native signal context structs, wouldn't it be preferable to add the support for reading out the signal context?

(See #2980 where I did this for OpenBSD ~5 years ago; I bumped into the other issue you name, the MSRV lag, and ultimately didn't push it forward. But this _particular_ missing bit isn't something we have to cut a corner on IMHO.)

Agreed that reading out the signal context would be the better fix for NetBSD and OpenBSD, and
thanks for the pointer to #2980. I don't plan to work on that myself, though, so I kept this PR to
the build fallback:

Thanks for taking a look

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 19:32):

aofusa edited a comment on PR #14990:

Given that NetBSD and OpenBSD both do have POSIX signals and native signal context structs, wouldn't it be preferable to add the support for reading out the signal context?

(See #2980 where I did this for OpenBSD ~5 years ago; I bumped into the other issue you name, the MSRV lag, and ultimately didn't push it forward. But this _particular_ missing bit isn't something we have to cut a corner on IMHO.)

Agreed that reading out the signal context would be the better fix for NetBSD and OpenBSD, and
thanks for the pointer to #2980. I don't plan to work on that myself, though, so I kept this PR to
the build fallback:

Thanks for taking a look.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 22:14):

alexcrichton commented on PR #14990:

My thinking is that while I agree implementing and filling this out is best we should also strive to compile on all platforms by default with Pulley support. My hope is that if Wasmtime ends up getting used more on these platforms then someone will be sufficiently motivated to fix the perf, but being able to get in the door at all still seems valuable.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 22:14):

alexcrichton added PR #14990 Don't use native signals on Unix targets without signal context support to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 22:47):

:check: alexcrichton merged PR #14990.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 26 2026 at 22:47):

alexcrichton removed PR #14990 Don't use native signals on Unix targets without signal context support from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC