diff --git a/.github/workflows/wasm-test.yaml b/.github/workflows/wasm-test.yaml index 39d98bd5..44c8bb00 100644 --- a/.github/workflows/wasm-test.yaml +++ b/.github/workflows/wasm-test.yaml @@ -28,10 +28,10 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Setup Node.js 20.x + - name: Setup Node.js 22.x uses: actions/setup-node@v6 with: - node-version: 20.x + node-version: 22.x - name: Setup Rust uses: actions-rs/toolchain@v1 with: @@ -41,7 +41,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22 + go-version: 1.23 - name: Install dependencies run: npm install @@ -52,12 +52,13 @@ jobs: - name: Test run: npm run test - - name: Rust example e2e tests - run: cd examples/rust && cargo test -r + # TODO: wasmtime exception handling support + # - name: Rust example e2e tests + # run: cd examples/rust && cargo test -r + + # - name: Go example e2e tests + # run: cd examples/go && go mod tidy && go run main.go - - name: Go example e2e tests - run: cd examples/go && go mod tidy && go run main.go - - name: Node.js example e2e tests run: cd examples/node && npm install && npm run build diff --git a/wasm/examples/browser/kcl.wasm b/wasm/examples/browser/kcl.wasm old mode 100644 new mode 100755 index accd5c70..8e1edce2 Binary files a/wasm/examples/browser/kcl.wasm and b/wasm/examples/browser/kcl.wasm differ diff --git a/wasm/examples/go/pkg/module/module.go b/wasm/examples/go/pkg/module/module.go index a975b63e..1ae9d3ab 100644 --- a/wasm/examples/go/pkg/module/module.go +++ b/wasm/examples/go/pkg/module/module.go @@ -43,7 +43,7 @@ func New(path string) (*KCLModule, error) { } linker := wasmtime.NewLinker(engine) err = linker.DefineWasi() - linker.FuncWrap("env", "kclvm_plugin_invoke_json_wasm", func(_name int32, _args int32, _kwargs int32) int32 { + linker.FuncWrap("env", "kcl_plugin_invoke_json_wasm", func(_name int32, _args int32, _kwargs int32) int32 { return 0 }) if err != nil { diff --git a/wasm/examples/rust/src/lib.rs b/wasm/examples/rust/src/lib.rs index c0845c10..0733c29e 100644 --- a/wasm/examples/rust/src/lib.rs +++ b/wasm/examples/rust/src/lib.rs @@ -40,7 +40,7 @@ impl KCLModule { let mut linker = Linker::new(&engine); linker.func_wrap( "env", - "kclvm_plugin_invoke_json_wasm", + "kcl_plugin_invoke_json_wasm", |_name: i32, _args: i32, _kwargs: i32| 0, )?; p1::add_to_linker_sync(&mut linker, |s| s)?; diff --git a/wasm/kcl.wasm b/wasm/kcl.wasm old mode 100644 new mode 100755 index 92f9264f..8e1edce2 Binary files a/wasm/kcl.wasm and b/wasm/kcl.wasm differ diff --git a/wasm/src/index.ts b/wasm/src/index.ts index f2f98fd0..d4a9a8ad 100644 --- a/wasm/src/index.ts +++ b/wasm/src/index.ts @@ -93,7 +93,7 @@ export async function load(opts?: KCLWasmLoadOptions) { const imports = { env: { - kclvm_plugin_invoke_json_wasm: ( + kcl_plugin_invoke_json_wasm: ( _method: number, _args: number, _kwargs: number