diff --git a/config.go b/config.go index 3cd574b..8e93558 100644 --- a/config.go +++ b/config.go @@ -143,6 +143,13 @@ func (cfg *Config) SetWasmGC(enabled bool) { runtime.KeepAlive(cfg) } +// SetWasmComponentModel configures whether the wasm component model proposal is +// enabled. +func (cfg *Config) SetWasmComponentModel(enabled bool) { + C.wasmtime_config_wasm_component_model_set(cfg.ptr(), C.bool(enabled)) + runtime.KeepAlive(cfg) +} + // SetWasmWideArithmetic configures whether wide arithmetic is enabled func (cfg *Config) SetWasmWideArithmetic(enabled bool) { C.wasmtime_config_wasm_wide_arithmetic_set(cfg.ptr(), C.bool(enabled)) diff --git a/config_test.go b/config_test.go index c36caa3..cb29f74 100644 --- a/config_test.go +++ b/config_test.go @@ -21,6 +21,7 @@ func TestConfig(t *testing.T) { NewConfig().SetWasmTailCall(true) NewConfig().SetWasmFunctionReferences(true) NewConfig().SetWasmGC(true) + NewConfig().SetWasmComponentModel(true) NewConfig().SetWasmWideArithmetic(true) NewConfig().SetConsumeFuel(true) NewConfig().SetStrategy(StrategyAuto)