bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
15.15k stars 1.27k forks source link

Pooling-allocator C-api support? #5085

Open rahulchaphalkar opened 1 year ago

rahulchaphalkar commented 1 year ago

Hi, is there a c-api to enable pooling-allocator ( change InstanceAllocationStrategy)? I checked in wasmtime-c-api but could not find one. Default instance config seems to be OnDemand so wondering how do i change that to Pooling. I have built with the required feature flags. https://github.com/bytecodealliance/wasmtime/blob/3e35c8f98a1efb7c2bc0a3234bca3c23a30293a9/crates/wasmtime/src/config.rs#L178

alexcrichton commented 1 year ago

At this time this isn't implemented but not for any inherent reason, it should be fine to add API bindings for the Config-related fields here. Would you be interested in sending such a PR?

rahulchaphalkar commented 1 year ago

Thank you. I will take a look at the changes that are required.