Browse Source
Disable `call-hook` crate feature by default (#8808 )
* Disable `call-hook` crate feature by default
This commit disables the `call-hook` feature for the Wasmtime crate
added in #8795 by default. The rationale is that this has a slight cost
to all embeddings even if the feature isn't used and it's not expected
to be that widely used of a feature, so off-by-default seems like a more
appropriate default.
* Enable all features in doc build
* More doc fixes
pull/8813/head
Alex Crichton
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
7 additions and
10 deletions
.github/workflows/main.yml
Cargo.toml
crates/wasi-preview1-component-adapter/Cargo.toml
crates/wasmtime/Cargo.toml
crates/wasmtime/src/lib.rs
@ -297,16 +297,14 @@ jobs:
- run : (cd docs && mdbook test -L ../target/debug/deps)
# Build Rust API documentation.
# We pass in the `component-model` feature
# to match the docs.rs metadata in
# crates/wasmtime/Cargo.toml.
#
# Enable extra features in crates as well to ensure they're documented
- run : |
cargo doc --no-deps --workspace \
--exclude wasmtime-cli \
--exclude test-programs \
--exclude wasi-http-tests \
--exclude cranelift-codegen-meta \
--features component-model
--features call-hook
env:
RUSTDOCFLAGS : --cfg=docsrs
- run : cargo doc --package cranelift-codegen-meta --document-private-items
@ -82,7 +82,7 @@ rustix = { workspace = true, features = ["mm", "param", "process"] }
[ dev-dependencies ]
# depend again on wasmtime to activate its default features for tests
wasmtime = { workspace = true , features = [ 'component-model' , 'async' , ' default' , 'winch' , 'debug-builtins ' , 'all-arc h' ] }
wasmtime = { workspace = true , features = [ 'default' , 'winch' , 'all-arch ' , 'c all-hook ' ] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = { workspace = true }
@ -22,6 +22,7 @@ object = { workspace = true, default-features = false, features = ["archive", "s
test = false
crate-type = [ "cdylib" ]
name = "wasi_snapshot_preview1"
doc = false
[ features ]
default = [ "reactor" ]
@ -125,7 +125,6 @@ default = [
'component-model' ,
'threads' ,
'std' ,
'call-hook' ,
]
# An on-by-default feature enabling runtime compilation of WebAssembly modules
@ -263,6 +262,5 @@ std = [
# Enables support for the `Store::call_hook` API which enables injecting custom
# logic around all entries/exits from WebAssembly. This has a slight performance
# cost for all host functions so is provided as a compile-time feature if
# embedders would like to disable it.
# cost for all host functions.
call-hook = [ ]
@ -254,7 +254,7 @@
//! * `threads` - Enabled by default, this enables compile-time support for the
//! WebAssembly `threads` proposal, notably shared memories.
//!
//! * `call-hook` - En abled by default, this enables support for the
//! * `call-hook` - Dis abled by default, this enables support for the
//! [`Store::call_hook`] API. This incurs a small overhead on all
//! entries/exits from WebAssembly and may want to be disabled by some
//! embedders.