From 2c3e2e96e9bd2f903377cd216737bf28cbae2826 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Feb 2026 09:28:01 +0000 Subject: [PATCH 1/3] Add gc_support and component model config setters Co-authored-by: effulgentsia --- config.go | 13 +++++++++++++ config_test.go | 2 ++ 2 files changed, 15 insertions(+) diff --git a/config.go b/config.go index 3cd574b..0745fc7 100644 --- a/config.go +++ b/config.go @@ -143,6 +143,19 @@ 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) { + 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..e878075 100644 --- a/config_test.go +++ b/config_test.go @@ -21,6 +21,8 @@ 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) NewConfig().SetStrategy(StrategyAuto) From 1ef929f68377707b6a3417d676cba51dcdc1c022 Mon Sep 17 00:00:00 2001 From: effulgentsia <477547+effulgentsia@users.noreply.github.com> Date: Tue, 24 Feb 2026 23:40:20 -0800 Subject: [PATCH 2/3] Postpone SetGCSupport until Wasmtime 43 --- config.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config.go b/config.go index 0745fc7..8e93558 100644 --- a/config.go +++ b/config.go @@ -143,12 +143,6 @@ 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 f9ce35bbe3b0e8987b90cb413d6972a50451064c Mon Sep 17 00:00:00 2001 From: effulgentsia <477547+effulgentsia@users.noreply.github.com> Date: Tue, 24 Feb 2026 23:41:02 -0800 Subject: [PATCH 3/3] Postpone SetGCSupport until Wasmtime 43 --- config_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/config_test.go b/config_test.go index e878075..cb29f74 100644 --- a/config_test.go +++ b/config_test.go @@ -21,7 +21,6 @@ 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)