-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Mach ports vs signals via Config
#6807
Configure Mach ports vs signals via Config
#6807
Conversation
This commit adds a `Config::macos_use_mach_ports` configuration option to replace the old `posix-signals-on-macos` compile-time Cargo feature. This'll make Wasmtime a tad larger on macOS but likely negligibly so. Otherwise this is intended to provide a resolution to bytecodealliance#6785 where embedders will be able to use any build of Wasmtime and configure at runtime how trap handling should happen. Functionally this commit additionally registers a `pthread_atfork` handler to cause any usage of Wasmtime in the child to panic. This should help head off a known-invalid state in case anyone runs into it in the future.
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:config"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
To modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me! Thanks for the detailed comment on the ports config!
* Configure Mach ports vs signals via `Config` This commit adds a `Config::macos_use_mach_ports` configuration option to replace the old `posix-signals-on-macos` compile-time Cargo feature. This'll make Wasmtime a tad larger on macOS but likely negligibly so. Otherwise this is intended to provide a resolution to bytecodealliance#6785 where embedders will be able to use any build of Wasmtime and configure at runtime how trap handling should happen. Functionally this commit additionally registers a `pthread_atfork` handler to cause any usage of Wasmtime in the child to panic. This should help head off a known-invalid state in case anyone runs into it in the future. * Fix build on non-macOS
This follows up bytecodealliance#6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in bytecodealliance#6807. It is needed for hosts that use signals instead of Mach ports on MacOs.
This follows up #6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in #6807. It is needed for hosts that use signals instead of Mach ports on MacOs.
…ce#7360) This follows up bytecodealliance#6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in bytecodealliance#6807. It is needed for hosts that use signals instead of Mach ports on MacOs.
…ce#7360) This follows up bytecodealliance#6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in bytecodealliance#6807. It is needed for hosts that use signals instead of Mach ports on MacOs.
This follows up #6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in #6807. It is needed for hosts that use signals instead of Mach ports on MacOs.
* Remove the leftover usage of `posix-signals-on-macos` (#7360) This follows up #6807 and removes the last remaining reference to the removed `posix-signals-on-macos` feature flag. Note that `lib.rs` now imports `mod unix` on MacOS. This change is similar to the change in `traphandlers.rs` in #6807. It is needed for hosts that use signals instead of Mach ports on MacOs. * wasi-nn: reenable CI task (#7164) The task was disabled due to a failing checksum. Since then, the `install-openvino-action` has improved and now _almost_ has cross-platform support. This change just restores the status quo in expectation that #6895 will significantly improve the testing story. prtest:full --------- Co-authored-by: Andrew Brown <andrew.brown@intel.com>
This commit adds a
Config::macos_use_mach_ports
configuration option to replace the oldposix-signals-on-macos
compile-time Cargo feature. This'll make Wasmtime a tad larger on macOS but likely negligibly so. Otherwise this is intended to provide a resolution to #6785 where embedders will be able to use any build of Wasmtime and configure at runtime how trap handling should happen.Functionally this commit additionally registers a
pthread_atfork
handler to cause any usage of Wasmtime in the child to panic. This should help head off a known-invalid state in case anyone runs into it in the future.