From 18c75cfe27f61bc90f2e6dc882c61a2b55e6caf4 Mon Sep 17 00:00:00 2001 From: Jairus Date: Tue, 15 Sep 2026 23:04:41 -0400 Subject: [PATCH 1/7] refactor: migrate to Wago public API --- go.mod | 2 +- go.sum | 4 ++-- internal/engine/engine.go | 12 +++++++----- testdata/conformance/wasmtime/xfail.json | 11 ----------- testdata/conformance/xfail.json | 1 - 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 28f88a4..57245ba 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.0.0-20260828131729-c1a5d215cab0 +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d diff --git a/go.sum b/go.sum index 0db3d66..60aaced 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/wago-org/wago v0.0.0-20260828131729-c1a5d215cab0 h1:JACyOKg+wp+pnQpu3ApLHDjrKxpN3/5zOFgnk/Xkayo= -github.com/wago-org/wago v0.0.0-20260828131729-c1a5d215cab0/go.mod h1:odr+6v51s1UDezUBJZrBBujWs/iD1pSHHhAVkb8BTQ0= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d h1:JjS2jdRwwGLo4g7brBkYdnQMLijuDrO+3qXOJ/mB8fI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= diff --git a/internal/engine/engine.go b/internal/engine/engine.go index c3752f3..331ec44 100644 --- a/internal/engine/engine.go +++ b/internal/engine/engine.go @@ -243,9 +243,10 @@ func (r *runtimeAdapter) instantiateModule(ctx context.Context, c CompiledModule continue } resolvedFuncs[coreImportIdentity{module: spec.Module, name: spec.Name}] = fn - var host core.HostFunc + var host any if hf, ok := fn.(*hostFunction); ok { - host = core.HostFunc(func(caller core.HostModule, params, results []uint64) { + host = func(caller core.Caller, call core.HostCall) { + params, results := call.ParamSlots(), call.ResultSlots() defer func() { if recovered := recover(); recovered != nil { switch recovered.(type) { @@ -266,15 +267,16 @@ func (r *runtimeAdapter) instantiateModule(ctx context.Context, c CompiledModule callCtx := context.WithValue(ctx, activeCallerKey{}, caller) hf.fn.Call(callCtx, callerModule{caller: caller}, stack) copy(results, stack) - }) + } } else if wf, ok := fn.(*wasmFunction); ok { - host = core.HostFunc(func(caller core.HostModule, params, results []uint64) { + host = func(caller core.Caller, call core.HostCall) { + params, results := call.ParamSlots(), call.ResultSlots() out, callErr := wf.mod.in.InvokeFromHost(ctx, caller, wf.name, params...) if callErr != nil { panic(core.HostTrap{Err: callErr}) } copy(results, out) - }) + } } if host != nil { owner, err := r.funcrefs.New(host, core.FuncSig{ diff --git a/testdata/conformance/wasmtime/xfail.json b/testdata/conformance/wasmtime/xfail.json index 94136b3..2bc25a5 100644 --- a/testdata/conformance/wasmtime/xfail.json +++ b/testdata/conformance/wasmtime/xfail.json @@ -16,12 +16,6 @@ "async__cancel-starting-subtask-does-not-leak__0000__L9": "component execution semantics for this regression are incomplete", "async__drop-host__0000__L5": "component execution semantics for this regression are incomplete", "async__drop-waitable-set-stackful__0000__L13": "fixture exceeds the plugin memory authority budget", - "async__exceptions__0001__L67": "core exception handling is disabled in Wago", - "async__exceptions__0003__L69": "core exception handling is disabled in Wago", - "async__exceptions__0006__L143": "core exception handling is disabled in Wago", - "async__exceptions__0008__L145": "core exception handling is disabled in Wago", - "async__exceptions__0011__L215": "core exception handling is disabled in Wago", - "async__exceptions__0013__L217": "core exception handling is disabled in Wago", "async__fused__0004__L104/action/L148": "required component-model trap is not enforced", "async__future-cancel-write-completed__0000__L5": "complete imported and aliased component type retention is not implemented", "async__future-drop-writable-after-notified-drop__0000__L4/action/L160": "this component re-entry shape is not implemented by Wago", @@ -91,10 +85,6 @@ "async__wait-forever2__0000__L5": "fixture exceeds the plugin memory authority budget", "async__yield-when-cancelled__0000__L6/action/L97": "this component re-entry shape is not implemented by Wago", "error-context-trap-in-post-return__0001__L45/action/L46": "required component-model trap is not enforced", - "exceptions__0000__L22": "core exception handling is disabled in Wago", - "exceptions__0002__L54": "core exception handling is disabled in Wago", - "exceptions__0004__L90": "core exception handling is disabled in Wago", - "exceptions__0006__L132": "core exception handling is disabled in Wago", "exceptions__0008__L168": "core exception handling is disabled in Wago", "fixed_length_lists__0000__L18": "114: decode component: nested component[0]: type section: type[0]: instancedecl[0]: unsupported (M1): defvaltype tag 0x67", "gc__empty__0000__L8": "component core-type sections are not implemented", @@ -103,7 +93,6 @@ "implements__0000__L3": "extern-name attributes are not implemented", "import__0000__L1": "complete component semantic validation is not implemented", "import__0001__L7": "114: instantiation succeeded, want trap containing \"expected instance found func\"", - "instance__0003__L34": "this component re-entry shape is not implemented by Wago", "instance__0006__L104": "component execution semantics for this regression are incomplete", "instance__0007__L130": "component execution semantics for this regression are incomplete", "instance__0008__L161": "component execution semantics for this regression are incomplete", diff --git a/testdata/conformance/xfail.json b/testdata/conformance/xfail.json index e936afb..37c3d6a 100644 --- a/testdata/conformance/xfail.json +++ b/testdata/conformance/xfail.json @@ -151,7 +151,6 @@ "binary__binary__0117__L1465": "complete component semantic validation is not implemented", "linking__link-time-virtualization__0000__L2": "component core-type sections are not implemented", "linking__shared-everything-dynamic-linking__0000__L4": "component core-type sections are not implemented", - "linking__shared-everything-dynamic-linking__0010__L152": "component re-entry leaves a host funcref importer live during teardown", "linking__shared-everything-dynamic-linking__0010__L152/action/L191": "this component re-entry shape is not implemented by Wago", "linking__tags__0000__L7": "core exception handling is disabled in Wago", "linking__tags__0003__L36": "core exception handling is disabled in Wago", From 54f9ac478c340420f5d1201cbacbdc2323535910 Mon Sep 17 00:00:00 2001 From: Jairus Date: Tue, 15 Sep 2026 23:23:56 -0400 Subject: [PATCH 2/7] test: retain Windows exception conformance expectations --- testdata/conformance/wasmtime/xfail_windows.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/testdata/conformance/wasmtime/xfail_windows.json b/testdata/conformance/wasmtime/xfail_windows.json index 75f55c5..02ec91d 100644 --- a/testdata/conformance/wasmtime/xfail_windows.json +++ b/testdata/conformance/wasmtime/xfail_windows.json @@ -1,4 +1,14 @@ { - "async__intra-streams__0004__L118": "Wago's Windows backend does not yet implement core multi-memory", + "async__exceptions__0001__L67": "Wago's Windows backend does not yet implement core exception handling", + "async__exceptions__0003__L69": "Wago's Windows backend does not yet implement core exception handling", + "async__exceptions__0006__L143": "Wago's Windows backend does not yet implement core exception handling", + "async__exceptions__0008__L145": "Wago's Windows backend does not yet implement core exception handling", + "async__exceptions__0011__L215": "Wago's Windows backend does not yet implement core exception handling", + "async__exceptions__0013__L217": "Wago's Windows backend does not yet implement core exception handling", + "exceptions__0000__L22": "Wago's Windows backend does not yet implement core exception handling", + "exceptions__0002__L54": "Wago's Windows backend does not yet implement core exception handling", + "exceptions__0004__L90": "Wago's Windows backend does not yet implement core exception handling", + "exceptions__0006__L132": "Wago's Windows backend does not yet implement core exception handling", + "async__intra-streams__0004__L118": "Wago's Windows backend does not yet implement core multi-memory", "async__intra-streams__0006__L179": "Wago's Windows backend does not yet implement core multi-memory" } From 860d61f8184d42dbd653f81bf5c9b19ac248e02a Mon Sep 17 00:00:00 2001 From: JairusSW Date: Tue, 15 Sep 2026 23:41:25 -0400 Subject: [PATCH 3/7] chore: pin final Wago API revision --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 57245ba..2087200 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf diff --git a/go.sum b/go.sum index 60aaced..b53c33c 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,4 @@ github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d h1:JjS2jdRwwGLo4g7brBkYdnQMLijuDrO+3qXOJ/mB8fI= github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf h1:xRaURj1fd21y7cU1hXQCF6H/y4LoE9+xv0wQpScSzuo= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= From 1d3b909c92f128227e623e5b837e096317dbc90d Mon Sep 17 00:00:00 2001 From: JairusSW Date: Wed, 16 Sep 2026 00:25:58 -0400 Subject: [PATCH 4/7] chore: pin final Wago API refactor head --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 2087200..d9d0612 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970 diff --git a/go.sum b/go.sum index b53c33c..b89f4d5 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,2 @@ -github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d h1:JjS2jdRwwGLo4g7brBkYdnQMLijuDrO+3qXOJ/mB8fI= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916025321-6f31d3371e1d/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf h1:xRaURj1fd21y7cU1hXQCF6H/y4LoE9+xv0wQpScSzuo= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916033857-43d658fadbdf/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970 h1:m0CVK79+M5tL3oTDO0uY6XHi200jTmMAhwRlTs4DAuM= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= From 22492e10af33ad0e76e33947fcb05018e5d38447 Mon Sep 17 00:00:00 2001 From: JairusSW Date: Wed, 16 Sep 2026 00:44:04 -0400 Subject: [PATCH 5/7] chore: repin final Wago API refactor --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9d0612..869e7e8 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970 +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48 diff --git a/go.sum b/go.sum index b89f4d5..ebcb01c 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970 h1:m0CVK79+M5tL3oTDO0uY6XHi200jTmMAhwRlTs4DAuM= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916041951-35866fb07970/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48 h1:pHMgqdBUa/co7GWzZpe1PtkpQ1NSdiul1NPpGfx+fjY= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= From aebec09f3d056029e5a62557f8813a55a0c6efb0 Mon Sep 17 00:00:00 2001 From: JairusSW Date: Wed, 16 Sep 2026 00:47:38 -0400 Subject: [PATCH 6/7] chore: pin final Wago API refactor head --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 869e7e8..9c8601a 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48 +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116 diff --git a/go.sum b/go.sum index ebcb01c..4fbf2ee 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48 h1:pHMgqdBUa/co7GWzZpe1PtkpQ1NSdiul1NPpGfx+fjY= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916044221-1ed62e8dbb48/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116 h1:0AgT2N3GaxZiyX8flgVdm7VtntDa0zrtDxuuinynKVQ= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= From 5b59600761d23e5f0b172036c4446e45538d512c Mon Sep 17 00:00:00 2001 From: JairusSW Date: Wed, 16 Sep 2026 01:09:35 -0400 Subject: [PATCH 7/7] chore: pin final Wago API refactor head --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9c8601a..ba8cb59 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/wago-org/component-model go 1.22.0 -require github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116 +require github.com/wago-org/wago v0.1.0-beta.8.0.20260916050830-c9ed2455acd9 diff --git a/go.sum b/go.sum index 4fbf2ee..f6a11d5 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116 h1:0AgT2N3GaxZiyX8flgVdm7VtntDa0zrtDxuuinynKVQ= -github.com/wago-org/wago v0.1.0-beta.8.0.20260916044641-e99947687116/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916050830-c9ed2455acd9 h1:+/8b9bvAnyUZPG+YTvGpDwpAV+jpp6+bBBWOrr+8Xco= +github.com/wago-org/wago v0.1.0-beta.8.0.20260916050830-c9ed2455acd9/go.mod h1:q0pPiPF6W6GZpTXbWwy+GT+r19KHSzB/gRcPUVHyntI=