diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b86ca3ccb7..83f915183c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 38611f585e..3f3115cd38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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-arch'] } +wasmtime = { workspace = true, features = ['default', 'winch', 'all-arch', 'call-hook'] } env_logger = { workspace = true } log = { workspace = true } filecheck = { workspace = true } diff --git a/crates/wasi-preview1-component-adapter/Cargo.toml b/crates/wasi-preview1-component-adapter/Cargo.toml index d8b3959add..583a879893 100644 --- a/crates/wasi-preview1-component-adapter/Cargo.toml +++ b/crates/wasi-preview1-component-adapter/Cargo.toml @@ -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"] diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo.toml index cb21b24e6f..7a8aa77664 100644 --- a/crates/wasmtime/Cargo.toml +++ b/crates/wasmtime/Cargo.toml @@ -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 = [] diff --git a/crates/wasmtime/src/lib.rs b/crates/wasmtime/src/lib.rs index 749447bc8e..baed60ec0d 100644 --- a/crates/wasmtime/src/lib.rs +++ b/crates/wasmtime/src/lib.rs @@ -254,7 +254,7 @@ //! * `threads` - Enabled by default, this enables compile-time support for the //! WebAssembly `threads` proposal, notably shared memories. //! -//! * `call-hook` - Enabled by default, this enables support for the +//! * `call-hook` - Disabled 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.