Commit 2cd52b7
authored
Allow creation of a CacheConfig without loading from a file (#10665)
* cache: Add builder pattern for CacheConfig
* wasmtime: Add cache_config method to wasmtime::Config
* Refactor test_builder_default to use test_prolog helper
* Remove enabled option from CacheConfigBuilder and always set to true
* Change builder methods to take &mut self and return &mut Self
* Simplify cache configuration API
A new `cache_config(Option<CacheConfig>)` method replaces multiple methods
for controlling module caching. Now `None` disables caching, and users can
directly provide a cache config or load one from a file.
* Make cache configuration optional
* Add Cache struct to separate configuration from runtime (wip)
* Ensure default values earlier
* Consolidate CacheConfig and CacheConfigBuilder
* Set Cache directly on wastime::Config and make it easier to create one
from a file
* Validate after loading file again
* Move cache to top-level module
* Fix tests1 parent 3a5dda5 commit 2cd52b7
File tree
15 files changed
+590
-450
lines changed- crates
- bench-api/src
- c-api/src
- cache/src
- config
- worker
- cli-flags/src
- wasmtime/src
- compile
- engine
- docs
- examples
- src/commands
15 files changed
+590
-450
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | | - | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
| |||
0 commit comments