Files
wasmtime/crates/runtime/Cargo.toml
Alex Crichton 9e0c910023 Add a Module::deserialize_file method (#3266)
* Add a `Module::deserialize_file` method

This commit adds a new method to the `wasmtime::Module` type,
`deserialize_file`. This is intended to be the same as the `deserialize`
method except for the serialized module is present as an on-disk file.
This enables Wasmtime to internally use `mmap` to avoid copying bytes
around and generally makes loading a module much faster.

A C API is added in this commit as well for various bindings to use this
accelerated path now as well. Another option perhaps for a Rust-based
API is to have an API taking a `File` itself to allow for a custom file
descriptor in one way or another, but for now that's left for a possible
future refactoring if we find a use case.

* Fix compat with main - handle readdonly mmap

* wip

* Try to fix Windows support
2021-08-31 13:05:51 -05:00

56 lines
1.6 KiB
TOML

[package]
name = "wasmtime-runtime"
version = "0.29.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 = "2018"
[dependencies]
wasmtime-environ = { path = "../environ", version = "0.29.0" }
wasmtime-fiber = { path = "../fiber", version = "0.29.0", optional = true }
region = "2.1.0"
libc = { version = "0.2.82", 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 = "0.3.61"
lazy_static = "1.3.0"
rand = "0.8.3"
anyhow = "1.0.38"
[target.'cfg(target_os = "macos")'.dependencies]
mach = "0.3.2"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.7", features = ["winbase", "memoryapi", "errhandlingapi", "handleapi"] }
[target.'cfg(target_os = "linux")'.dependencies]
userfaultfd = { version = "0.3.0", optional = true }
[build-dependencies]
cc = "1.0"
[badges]
maintenance = { status = "actively-developed" }
[features]
default = []
async = ["wasmtime-fiber"]
# Enables support for userfaultfd in the pooling allocator when building on Linux
uffd = ["userfaultfd"]
# 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 = []