Decouple some more Config methods from each other (#4262)

* Decouple some more `Config` methods from each other

This commit decouples validation of stack sizes and guard sizes until
`Engine::new` to avoid odd interactions between the order of invocation
of `Config` methods.

* Fix C API

* Typos
This commit is contained in:
Alex Crichton
2022-06-14 09:26:55 -05:00
committed by GitHub
parent 7e0bb465d0
commit 72f0e46fdb
3 changed files with 46 additions and 33 deletions

View File

@@ -8,16 +8,19 @@ Unreleased.
### Changed
* The `Config::strategy`, `Config::cranelift_flag_enable`, `Config::cranelift_flag_set`
and `Config::profiler` APIs now return `&mut Self` instead of `Result<&mut Self>`
since the validation is deferred until `Engine::new`.
* Some methods on the `Config` structure now return `&mut Self` instead of
`Result<&mut Self>` since the validation is deferred until `Engine::new`:
`profiler`, `cranelift_flag_enable`, `cranelift_flag_set`, `max_wasm_stack`,
`async_stack_size`, and `strategy`.
[#4252](https://github.com/bytecodealliance/wasmtime/pull/4252)
[#4262](https://github.com/bytecodealliance/wasmtime/pull/4262)
### Fixed
* A refactor of `Config` was made to fix an issue that the order of calls to `Config`
matters now, which may lead to unexpected behavior.
[#4252](https://github.com/bytecodealliance/wasmtime/pull/4252)
[#4262](https://github.com/bytecodealliance/wasmtime/pull/4262)
--------------------------------------------------------------------------------