Add an instance limit to Config (#2593)
* Add an instance limit to `Config` This commit adds a new parameter to `Config` which limits the number of instances that can be created within a store connected to that `Config`. The intention here is to provide a default safeguard against module-linking modules that recursively create too many instances. * Update crates/c-api/include/wasmtime.h Co-authored-by: Peter Huene <peter@huene.dev> Co-authored-by: Peter Huene <peter@huene.dev>
This commit is contained in:
@@ -274,6 +274,14 @@ WASMTIME_CONFIG_PROP(void, static_memory_guard_size, uint64_t)
|
||||
*/
|
||||
WASMTIME_CONFIG_PROP(void, dynamic_memory_guard_size, uint64_t)
|
||||
|
||||
/**
|
||||
* \brief Configures the maximum number of instances that can be created.
|
||||
*
|
||||
* For more information see the Rust documentation at
|
||||
* https://bytecodealliance.github.io/wasmtime/api/wasmtime/struct.Config.html#method.max_instances.
|
||||
*/
|
||||
WASMTIME_CONFIG_PROP(void, max_instances, size_t)
|
||||
|
||||
/**
|
||||
* \brief Enables Wasmtime's cache and loads configuration from the specified
|
||||
* path.
|
||||
|
||||
Reference in New Issue
Block a user