1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 10:07:54 -05:00

fix: support non-function exports in Wasm modules (#26992)

Closes https://github.com/denoland/deno/issues/26986
This commit is contained in:
Bartek Iwańczuk 2024-11-22 00:46:23 +00:00
parent 053fc7cbe0
commit 9236786d56
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
7 changed files with 26 additions and 7 deletions

12
Cargo.lock generated
View file

@ -1466,9 +1466,9 @@ dependencies = [
[[package]]
name = "deno_core"
version = "0.321.0"
version = "0.322.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd2a54cda74cdc187d5fc2d23370a45cf09f912caf566dd1cd24a50157d809c7"
checksum = "2f593ef2b8acab8cd3ace9d50052edc65a3654fdbde808070cfa5da5cf7aaae6"
dependencies = [
"anyhow",
"bincode",
@ -1983,9 +1983,9 @@ dependencies = [
[[package]]
name = "deno_ops"
version = "0.197.0"
version = "0.198.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a8825d92301cf445727c43f17fee2a20fcdf4370004339965156ae7c56c97e"
checksum = "870826735cd9aa0376d2aadca14365b753e830e3cc16891efb9232845a6982a4"
dependencies = [
"proc-macro-rules",
"proc-macro2",
@ -6666,9 +6666,9 @@ dependencies = [
[[package]]
name = "serde_v8"
version = "0.230.0"
version = "0.231.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a783242d2af51d6955cc04bf2b64adb643ab588b61e9573c908a69dabf8c2f"
checksum = "1a0c48b8842ebae21c52da1d978fba5c2be5991680bddfdc1a36ee0ccbc60114"
dependencies = [
"num-bigint",
"serde",

View file

@ -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"] }

View file

@ -0,0 +1,4 @@
{
"args": "run --check main.js",
"output": "main.out"
}

View file

@ -0,0 +1,2 @@
import * as wasm from "./mod.wasm";
console.log(wasm);

View file

@ -0,0 +1,7 @@
Check [WILDCARD]
[Module: null prototype] {
func: [Function: 0],
global: Global [WebAssembly.Global] {},
memory: Memory [WebAssembly.Memory] {},
table: Table [WebAssembly.Table] {}
}

View file

@ -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)
)