You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wasmtime offers flexible configurability through options like the "pooling allocation strategy" and "parallel compilation", which can be set programmatically using the wasmtime::Config struct. To simplify this process and enhance usability, I propose adding support for a configuration file that Wasmtime can consume. This would enable users to configure the engine using a straightforward and centralized file format.
Benefit
Services (such as containerd wasmtime-shim) that uses wasmtime APIs to compile and execute Wasm components today rely on environment variables to configure Wasmtime engine. Whether it is to disable parallel compilation or change the pooling allocation strategy. With the huge number of configuration options that wasmtime provides, it is difficult for users and service providers to maintain these dynamic configuration options. We suggest using a TOML or YAML file for the configuration file due to their readability.
Implementation
Parsing Configuration File:
Implement a parser to read and deserialize the configuration file into a wasmtime::Config struct.
Applying Configuration:
Extend the wasmtime::Config struct with methods to apply settings from the deserialized configuration.
Alternatives
Interestingly, wasmtime CLI has a config command in which you can use it to create a new config.
$ wasmtime config new
Successfully created a new configuration file at '/home/mossaka/.config/wasmtime/config.toml'.
However, this config command is used ONLY for cache configuration, which is a tiny fraction of the total configuration options that wasmtime provides.
The text was updated successfully, but these errors were encountered:
Extending the existing cache-config TOML for general Wasmtime options makes sense to me.
We probably want to refactor our config and CLI and (now) TOML code such that there is one source of truth that automatically makes knobs for each configurable thing in all those various places.
Feature
Wasmtime offers flexible configurability through options like the "pooling allocation strategy" and "parallel compilation", which can be set programmatically using the
wasmtime::Config
struct. To simplify this process and enhance usability, I propose adding support for a configuration file that Wasmtime can consume. This would enable users to configure the engine using a straightforward and centralized file format.Benefit
Services (such as containerd wasmtime-shim) that uses wasmtime APIs to compile and execute Wasm components today rely on environment variables to configure Wasmtime engine. Whether it is to disable parallel compilation or change the pooling allocation strategy. With the huge number of configuration options that wasmtime provides, it is difficult for users and service providers to maintain these dynamic configuration options. We suggest using a TOML or YAML file for the configuration file due to their readability.
Implementation
Parsing Configuration File:
Implement a parser to read and deserialize the configuration file into a
wasmtime::Config
struct.Applying Configuration:
Extend the
wasmtime::Config
struct with methods to apply settings from the deserialized configuration.Alternatives
Interestingly, wasmtime CLI has a
config
command in which you can use it to create a newconfig
.$ wasmtime config new Successfully created a new configuration file at '/home/mossaka/.config/wasmtime/config.toml'.
However, this config command is used ONLY for cache configuration, which is a tiny fraction of the total configuration options that wasmtime provides.
The text was updated successfully, but these errors were encountered: