bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.44k stars 1.3k forks source link

Add a `signals-based-traps` Cargo compile-time feature #9614

Closed alexcrichton closed 6 days ago

alexcrichton commented 1 week ago

This PR adds a new signals-based-traps Cargo compile-time feature which mirrors the Config::signals_based_traps runtime configuration. Disabling this Cargo feature enables reducing Wasmtime's platform requirements to remove the need for virtual memory and trap handlers for example. That means that the underlying platform requirements are just setjmp/longjmp and a single pointer of thread-local storage. This should make it significantly easier to port Wasmtime to platforms that may not have virtual memory in the future.

I'll note that one of the main purposes of this PR isn't quite realized just yet which is to run Pulley on embedded systems. Pulley isn't finished, however, so this is more setting the stage for that to be possible in the future than enabling it right this red-hot-second.

github-actions[bot] commented 1 week ago

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to complete this check list:


To modify this label's message, edit the .github/label-messager/wasmtime-config.md file. To add new label messages or remove existing label messages, edit the .github/label-messager.json configuration file. [Learn more.](https://github.com/bytecodealliance/label-messager-action)
github-actions[bot] commented 1 week ago

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "fuzzing", "wasi", "wasmtime:api", "wasmtime:config" Thus the following users have been cc'd because of the following labels: * fitzgen: fuzzing To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file. [Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)
alexcrichton commented 6 days ago

I've pushed some extra refactoring of MmapVec as well to handle the internals a bit better given today's requirements.