Files
wasmtime/crates/runtime/Cargo.toml
Alex Crichton 601e8f3094 Remove dependency on the region crate (#4407)
This commit removes Wasmtime's dependency on the `region` crate. The
motivation for this came about when I was updating dependencies and saw
that `region` had a new major version at 3.0.0 as opposed to our
currently used 2.3 track. In reviewing the use cases of `region` within
Wasmtime I found two trends in particular which motivated this commit:

* Some unix-specific areas of `wasmtime_runtime` use
  `rustix::mm::mprotect` instead of `region::protect` already. This
  means that the usage of `region::protect` for changing virtual memory
  protections was already inconsistent.

* Many uses of `region::protect` were already in unix-specific regions
  which could make use of `rustix`.

Overall I opted to remove the dependency on the `region` crate to avoid
chasing its versions over time. Unix-specific changes of protections
were easily changed to `rustix::mm::mprotect`. There were two locations
where a windows/unix split is now required and I subjectively ruled
"that seems ok". Finally removing `region` also meant that the "what is
the current page size" query needed to be inlined into
`wasmtime_runtime`, which I have also subjectively ruled "that seems
fine".

Finally one final refactoring here was that the `unix.rs` and `linux.rs`
split for the pooling allocator was merged. These two files already only
differed in one function so I slapped a `cfg_if!` in there to help
reduce the duplication.
2022-07-07 21:28:25 +00:00

66 lines
1.8 KiB
TOML

[package]
name = "wasmtime-runtime"
version = "0.40.0"
authors = ["The Wasmtime Project Developers"]
description = "Runtime library support for Wasmtime"
documentation = "https://docs.rs/wasmtime-runtime"
license = "Apache-2.0 WITH LLVM-exception"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasmtime"
edition = "2021"
[dependencies]
wasmtime-environ = { path = "../environ", version = "=0.40.0" }
wasmtime-fiber = { path = "../fiber", version = "=0.40.0", optional = true }
wasmtime-jit-debug = { path = "../jit-debug", version = "=0.40.0", features = ["gdb_jit_int"] }
libc = { version = "0.2.112", default-features = false }
log = "0.4.8"
memoffset = "0.6.0"
indexmap = "1.0.2"
thiserror = "1.0.4"
more-asserts = "0.2.1"
cfg-if = "1.0"
backtrace = { version = "0.3.61" }
rand = "0.8.3"
anyhow = "1.0.38"
memfd = { version = "0.6.1", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
mach = "0.3.2"
[target.'cfg(unix)'.dependencies]
rustix = { version = "0.35.6", features = ["mm"] }
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.36.0"
features = [
"Win32_System_Kernel",
"Win32_System_Memory",
"Win32_System_Diagnostics_Debug",
"Win32_System_SystemInformation",
"Win32_Storage_FileSystem",
"Win32_Security",
]
[build-dependencies]
cc = "1.0"
[badges]
maintenance = { status = "actively-developed" }
[features]
memory-init-cow = ['memfd']
async = ["wasmtime-fiber"]
# Enables support for the pooling instance allocator
pooling-allocator = []
# Enables trap handling using POSIX signals instead of Mach exceptions on MacOS.
# It is useful for applications that do not bind their own exception ports and
# need portable signal handling.
posix-signals-on-macos = []
component-model = ["wasmtime-environ/component-model"]