From fd7d51e440fe6e8bbae91f5197e6d6a477abf063 Mon Sep 17 00:00:00 2001 From: effulgentsia <477547+effulgentsia@users.noreply.github.com> Date: Tue, 17 Mar 2026 00:29:41 -0700 Subject: [PATCH 1/2] Add SetGCSupport method to Config --- config.go | 6 ++++++ 1 file changed, 6 insertions(+) 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) { From 724b9cb4e37a42f86efe465d50a0709d95d551ae Mon Sep 17 00:00:00 2001 From: effulgentsia <477547+effulgentsia@users.noreply.github.com> Date: Tue, 17 Mar 2026 00:31:07 -0700 Subject: [PATCH 2/2] Smoke test SetGCSupport() in configuration tests --- config_test.go | 1 + 1 file changed, 1 insertion(+) 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)