-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate platform-specific definitions in Wasmtime (#7626)
* Gate more functionality behind `debug-builtins` This commit extends the gating behavior of the preexisting `debug-builtins` Cargo feature to cover more GDB-related functionality associated with debugging. This can additionally slim down the set of exposed symbols from Wasmtime over the default with them included. * Move timing in Cranelift behind a Cargo feature This commit adds a `timing` feature to the `cranelift-codegen` crate which is enabled by default. This feature gates the timing functionality in Cranelift to enable turning it off if desired. The goal of this commit is to remove a system dependency on `Instant` for possibly esoteric environments. * Consolidate platform-specific definitions in Wasmtime Prior to this commit Wasmtime did not not have a style or system for containing platform-specific logic in files. The goal of this commit is to consolidate all platform-specific functionality into one location to make it easier to port Wasmtime to new systems. This commit creates a `sys` module within the `wasmtime-runtime` crate which conditionally defines all of the platform support that Wasmtime requires, namely things related to virtual memory management and trap handling. Many of the previous `unix.rs` files interspersed throughout the tree are now all located in a single `unix` directory. This additionally helps split out `miri`-specific functionality by pretending `miri` is its own platform. This change additionally goes through `#[cfg]` directives throughout `wasmtime-runtime`, `wasmtime-jit`, and `wasmtime` itself to place all of this target-specific functionality within this `sys` directory. The end state is that there are two new top-level modules in the `wasmtime-runtime` crate: * `arch` - this conditionally defines architecture-specific logic such as the state used by backtraces, libcalls, etc. * `sys` - this conditionally defines OS or platform-specific logic such as virtual memory management. One secondary goal of this commit is to enable the ability to easily add new platforms to Wasmtime, even if it's in a fork of Wasmtime. Previously patches might have to touch a good number of locations where now they'd ideally only have to touch `sys/mod.rs` to declare a new platform and `sys/$platform/*.rs` to define all the functionality. * Fix build on Windows prtest:full * Fix some build warnings * Fix miri build * Include debug-builtins when testing * Try to fix Windows tests * Fix warnings on miri * Fix miri build * Fix debug-builtins feature * More feature fixes * Rename `fd` field * Fix speeling * Review comments
- Loading branch information
1 parent
af38ee0
commit 494e2b8
Showing
59 changed files
with
1,017 additions
and
845 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.