Skip to content

Commit 8846f14

Browse files
benbrandtbongjunj
authored andcommitted
Update cache configuration documentation and references (bytecodealliance#10859)
Remove references to deprecated cache config methods and update to use the new simplified `Config::cache` API. Also remove the mandatory `enabled` field from cache configuration documentation since all cache settings are now optional.
1 parent b88ad35 commit 8846f14

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

crates/wasmtime/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@
195195
//!
196196
//! * `cache` - Enabled by default, this feature adds support for wasmtime to
197197
//! perform internal caching of modules in a global location. This must still
198-
//! be enabled explicitly through [`Config::cache_config_load`] or
199-
//! [`Config::cache_config_load_default`].
198+
//! be enabled explicitly through [`Config::cache`].
200199
//!
201200
//! * `wat` - Enabled by default, this feature adds support for accepting the
202201
//! text format of WebAssembly in [`Module::new`] and

docs/cli-cache.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ wasmtime config new
88
It will print the location regardless of the success.
99
Please refer to the `--help` message for using a custom location.
1010

11-
All settings, except `enabled`, are **optional**.
11+
All settings are **optional**.
1212
If the setting is not specified, the **default** value is used.
1313
***Thus, if you don't know what values to use, don't specify them.***
1414
The default values might be tuned in the future.
@@ -31,20 +31,6 @@ welcome to discuss it and contribute to [the Wasmtime repository].
3131

3232
[the Wasmtime repository]: https://github.com/bytecodealliance/wasmtime
3333

34-
Setting `enabled`
35-
-----------------
36-
- **type**: boolean
37-
- **format**: `true | false`
38-
- **default**: `true`
39-
40-
Specifies whether the cache system is used or not.
41-
42-
This field is *mandatory*.
43-
The default value is used when configuration file is not specified
44-
and none exists at the default location.
45-
46-
[`enabled`]: #setting-enabled
47-
4834
Setting `directory`
4935
-----------------
5036
- **type**: string (path)

docs/examples-fast-compilation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ result rather than performing compilation all over again.
1515

1616
See these API docs for more details:
1717

18-
* [`wasmtime::Config::cache_config_load`](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.cache_config_load)
19-
* [`wasmtime::Config::cache_config_load_default`](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.cache_config_load_default)
20-
* [`wasmtime::Config::disable_cache`](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.disable_cache)
18+
* [`wasmtime::Config::cache`](https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.cache)
2119
* [`wasmtime::CacheStore`](https://docs.rs/wasmtime/latest/wasmtime/trait.CacheStore.html)
2220

2321
## Enable Winch

0 commit comments

Comments
 (0)