diff --git a/config.go b/config.go index 8e93558..0745fc7 100644 --- a/config.go +++ b/config.go @@ -143,6 +143,12 @@ func (cfg *Config) SetWasmGC(enabled bool) { runtime.KeepAlive(cfg) } +// SetGCSupport enables or disables GC support in Wasmtime entirely. +func (cfg *Config) SetGCSupport(enabled bool) { + C.wasmtime_config_gc_support_set(cfg.ptr(), C.bool(enabled)) + runtime.KeepAlive(cfg) +} + // SetWasmComponentModel configures whether the wasm component model proposal is // enabled. func (cfg *Config) SetWasmComponentModel(enabled bool) { diff --git a/config_test.go b/config_test.go index cb29f74..e878075 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().SetGCSupport(true) NewConfig().SetWasmComponentModel(true) NewConfig().SetWasmWideArithmetic(true) NewConfig().SetConsumeFuel(true)