Skip to content

Commit edf64ed

Browse files
committed
chore: make wasm exception handle support todo
Signed-off-by: Peefy <xpf6677@163.com>
1 parent 2633212 commit edf64ed

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

.github/workflows/wasm-test.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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)