Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.go text eol=lf
*.json text eol=lf
*.yml text eol=lf
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,39 @@ jobs:
run: go build ./...
- name: Test with race detector and coverage
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...

windows:
name: Windows amd64
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Format
shell: bash
run: test -z "$(gofmt -l .)"
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test -timeout 20m ./...

windows-arm64:
name: Windows arm64
runs-on: windows-11-arm
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test -timeout 20m ./...
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ Malformed component encodings, invalid type relationships, out-of-bounds
memory access, bad resource ownership transfers, missing imports, and
unsupported behavior return errors or named guest traps.

The provider supports Wago on `linux/amd64`, `linux/arm64`, `darwin/amd64`,
`darwin/arm64`, `windows/amd64`, and `windows/arm64`. Component graphs that
require a Core WebAssembly feature unavailable on the selected Wago backend
fail closed during compilation.

## Test

```sh
Expand Down
17 changes: 16 additions & 1 deletion conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"math"
"reflect"
"runtime"
"strconv"
"strings"
"testing"
Expand All @@ -17,7 +18,7 @@ import (
"github.com/wago-org/component-model/internal/binary"
)

//go:embed testdata/conformance/manifest.json testdata/conformance/xfail.json testdata/conformance/generated/*.wasm testdata/conformance/wasmtime/manifest.json testdata/conformance/wasmtime/xfail.json testdata/conformance/wasmtime/generated/*.wasm
//go:embed testdata/conformance/manifest.json testdata/conformance/xfail.json testdata/conformance/xfail_windows.json testdata/conformance/generated/*.wasm testdata/conformance/wasmtime/manifest.json testdata/conformance/wasmtime/xfail.json testdata/conformance/wasmtime/xfail_windows.json testdata/conformance/wasmtime/generated/*.wasm
var conformanceFixtures embed.FS

type conformanceManifest struct {
Expand Down Expand Up @@ -167,6 +168,20 @@ func readConformanceXfails(t *testing.T, path string) map[string]string {
if err := json.Unmarshal(data, &xfails); err != nil {
t.Fatal(err)
}
if runtime.GOOS == "windows" {
platformPath := strings.TrimSuffix(path, ".json") + "_windows.json"
data, err := conformanceFixtures.ReadFile(platformPath)
if err != nil {
t.Fatal(err)
}
var platform map[string]string
if err := json.Unmarshal(data, &platform); err != nil {
t.Fatal(err)
}
for id, reason := range platform {
xfails[id] = reason
}
}
return xfails
}

Expand Down
3 changes: 2 additions & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ func Definition() wago.PluginDefinition {
Description: "WebAssembly Component Model execution and Canonical ABI linking for Wago.",
Stability: wago.Experimental,
Compatibility: wago.Compatibility{
Engines: map[string]string{"wago": ">=0.1.0"},
Engines: map[string]string{"wago": ">=0.1.0"},
Platforms: []string{"darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "windows/amd64", "windows/arm64"},
},
Provenance: wago.PluginProvenance{
Homepage: "https://github.com/wago-org/component-model#readme",
Expand Down
4 changes: 4 additions & 0 deletions testdata/conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ failure ledgers in `xfail.json`; an expected failure that starts passing fails
the suite until its ledger entry is removed. Unsupported parent instances are
still represented in the manifest, so their child assertions become runnable
without another fixture import once the parent feature lands.

Platform-specific backend gaps use adjacent `xfail_<goos>.json` ledgers. These
have the same unexpected-pass behavior as the shared ledger and must only
describe failures caused by the selected Wago platform backend.
4 changes: 4 additions & 0 deletions testdata/conformance/wasmtime/xfail_windows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"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"
}
4 changes: 4 additions & 0 deletions testdata/conformance/xfail_windows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"linking__unit__0036__L261": "Wago's Windows backend does not yet implement core multi-memory",
"linking__unit__0054__L355": "Wago's Windows backend does not yet implement core multi-memory"
}
3 changes: 2 additions & 1 deletion wago.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"category": "runtime",
"tags": ["webassembly", "component-model", "canonical-abi", "runtime"],
"authors": [{"name": "Jairus Tanaka", "github": "JairusSW"}],
"engines": {"wago": ">=0.1.0"}
"engines": {"wago": ">=0.1.0"},
"platforms": ["darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "windows/amd64", "windows/arm64"]
}
}
12 changes: 10 additions & 2 deletions wago.providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
"compatibility": {
"engines": {
"wago": "\u003e=0.1.0"
}
},
"platforms": [
"darwin/amd64",
"darwin/arm64",
"linux/amd64",
"linux/arm64",
"windows/amd64",
"windows/arm64"
]
},
"provenance": {
"homepage": "https://github.com/wago-org/component-model#readme",
Expand Down Expand Up @@ -57,7 +65,7 @@
}
]
},
"definitionDigest": "sha256:e5a10f39c613b58e12e5b59d2cdbda1d5a95eff9b247e15eb3063c532c8dca4c"
"definitionDigest": "sha256:d2c00c06100f562cb1fe1ac1289c1d9d09ef2c31a5e15d47a48a4c0a39eb0fd3"
}
]
}
Loading