feat: add PluginBuilder::with_wasmtime_config#764
Conversation
|
Feels like this is safe to do, since we plan to consider dropping Wasmtime for most SDKs except possibly an |
|
Yeah, that's the goal, and we can always replace this with some other configuration options when we drop wasmtime, since there will be some refactoring needed at that point anyway - until then this gives users of the current Rust SDK some control over the low-level stuff that we don't necessarily need to care about. |
Sorry if I'm a bit late, but I think it would be quite usefull to know which values are overwritten. I can already imagine a user changing settings and wondering why nothing is changing. From what I could quickly see, here's the spot where we overwrite some settings: Could we change Configure an initial wasmtime config to be passed to the plugin Warning: some values might be may be overwritten by the Extism runtime. In particular:
See the implementation details of [this function](Plugin::build_new) to check which values are overwritten. |
|
Good idea, can you open a PR with this change? |
PR for #764 (comment) --------- Co-authored-by: Sebastian Hambura <[email protected]>
An alternative to #763, this PR allows an initial
wasmtime::Configto be passed in when building a plugin. Some of these values may be overwritten by the Extism runtime, but it allows for things like static memory size and other low-level details to be handled directly instead of us having to wrap every option ourselves.