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

@@ -60,8 +60,8 @@ pub extern "C" fn wasmtime_config_epoch_interruption_set(c: &mut wasm_config_t,
}
#[no_mangle]
pub extern "C" fn wasmtime_config_max_wasm_stack_set(c: &mut wasm_config_t, size: usize) -> bool {
c.config.max_wasm_stack(size).is_ok()
pub extern "C" fn wasmtime_config_max_wasm_stack_set(c: &mut wasm_config_t, size: usize) {
c.config.max_wasm_stack(size);
}
#[no_mangle]