Skip to content

Commit a849df8

Browse files
authored
Merge pull request #260 from kcl-lang/chore-wasm-exception-support-todo
chore: make wasm exception handle support todo
2 parents 2633212 + 433076f commit a849df8

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

.github/workflows/wasm-test.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828

2929
steps:
3030
- uses: actions/checkout@v6
31-
- name: Setup Node.js 20.x
31+
- name: Setup Node.js 22.x
3232
uses: actions/setup-node@v6
3333
with:
34-
node-version: 20.x
34+
node-version: 22.x
3535
- name: Setup Rust
3636
uses: actions-rs/toolchain@v1
3737
with:
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup Go
4242
uses: actions/setup-go@v6
4343
with:
44-
go-version: 1.22
44+
go-version: 1.23
4545

4646
- name: Install dependencies
4747
run: npm install
@@ -52,12 +52,13 @@ jobs:
5252
- name: Test
5353
run: npm run test
5454

55-
- name: Rust example e2e tests
56-
run: cd examples/rust && cargo test -r
55+
# TODO: wasmtime exception handling support
56+
# - name: Rust example e2e tests
57+
# run: cd examples/rust && cargo test -r
58+
59+
# - name: Go example e2e tests
60+
# run: cd examples/go && go mod tidy && go run main.go
5761

58-
- name: Go example e2e tests
59-
run: cd examples/go && go mod tidy && go run main.go
60-
6162
- name: Node.js example e2e tests
6263
run: cd examples/node && npm install && npm run build
6364

wasm/examples/browser/kcl.wasm

100644100755
-249 KB
Binary file not shown.

wasm/examples/go/pkg/module/module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func New(path string) (*KCLModule, error) {
4343
}
4444
linker := wasmtime.NewLinker(engine)
4545
err = linker.DefineWasi()
46-
linker.FuncWrap("env", "kclvm_plugin_invoke_json_wasm", func(_name int32, _args int32, _kwargs int32) int32 {
46+
linker.FuncWrap("env", "kcl_plugin_invoke_json_wasm", func(_name int32, _args int32, _kwargs int32) int32 {
4747
return 0
4848
})
4949
if err != nil {

wasm/examples/rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl KCLModule {
4040
let mut linker = Linker::new(&engine);
4141
linker.func_wrap(
4242
"env",
43-
"kclvm_plugin_invoke_json_wasm",
43+
"kcl_plugin_invoke_json_wasm",
4444
|_name: i32, _args: i32, _kwargs: i32| 0,
4545
)?;
4646
p1::add_to_linker_sync(&mut linker, |s| s)?;

wasm/kcl.wasm

100644100755
-392 KB
Binary file not shown.

wasm/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export async function load(opts?: KCLWasmLoadOptions) {
9393

9494
const imports = {
9595
env: {
96-
kclvm_plugin_invoke_json_wasm: (
96+
kcl_plugin_invoke_json_wasm: (
9797
_method: number,
9898
_args: number,
9999
_kwargs: number

0 commit comments

Comments
 (0)