Skip to content

Commit

Permalink
fix: support non-function exports in Wasm modules (#26992)
Browse files Browse the repository at this point in the history
Closes #26986
  • Loading branch information
bartlomieju authored Nov 22, 2024
1 parent 45fad6a commit 5ca47ee
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repository = "https://github.com/denoland/deno"

[workspace.dependencies]
deno_ast = { version = "=0.43.3", features = ["transpiling"] }
deno_core = { version = "0.321.0" }
deno_core = { version = "0.322.0" }

deno_bench_util = { version = "0.173.0", path = "./bench_util" }
deno_config = { version = "=0.39.2", features = ["workspace", "sync"] }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"args": "run --check main.js",
"output": "main.out"
}
2 changes: 2 additions & 0 deletions tests/specs/run/wasm_module/table_global_memory/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import * as wasm from "./mod.wasm";
console.log(wasm);
7 changes: 7 additions & 0 deletions tests/specs/run/wasm_module/table_global_memory/main.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Check [WILDCARD]
[Module: null prototype] {
func: [Function: 0],
global: Global [WebAssembly.Global] {},
memory: Memory [WebAssembly.Memory] {},
table: Table [WebAssembly.Table] {}
}
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/specs/run/wasm_module/table_global_memory/mod.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(module
(func (export "func") unreachable)
(table (export "table") 0 funcref)
(memory (export "memory") 0)
(global (export "global") i32 i32.const 0)
)

0 comments on commit 5ca47ee

Please sign in to comment.