Configure Mach ports vs signals via Config#6807
Configure Mach ports vs signals via Config#6807alexcrichton merged 2 commits intobytecodealliance:mainfrom
Config#6807Conversation
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 DetailsThis 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
DetailsTo modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
elliottt
left a comment
There was a problem hiding this comment.
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_portsconfiguration option to replace the oldposix-signals-on-macoscompile-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_atforkhandler 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.