Add *.wast support for invoking components (#4526)
This commit builds on bytecodealliance/wasm-tools#690 to add support to testing of the component model to execute functions when running `*.wast` files. This support is all built on #4442 as functions are invoked through a "dynamic" API. Right now the testing and integration is fairly crude but I'm hoping that we can try to improve it over time as necessary. For now this should provide a hopefully more convenient syntax for unit tests and the like.
This commit is contained in:
@@ -15,13 +15,13 @@ log = "0.4.8"
|
||||
rayon = "1.2.1"
|
||||
target-lexicon = "0.12.3"
|
||||
tempfile = "3.3.0"
|
||||
wasmparser = "0.87.0"
|
||||
wasmprinter = "0.2.37"
|
||||
wasmparser = "0.88.0"
|
||||
wasmprinter = "0.2.38"
|
||||
wasmtime = { path = "../wasmtime" }
|
||||
wasmtime-wast = { path = "../wast" }
|
||||
wasm-encoder = "0.14.0"
|
||||
wasm-smith = "0.11.2"
|
||||
wasm-mutate = "0.2.5"
|
||||
wasm-encoder = "0.15.0"
|
||||
wasm-smith = "0.11.3"
|
||||
wasm-mutate = "0.2.6"
|
||||
wasm-spec-interpreter = { path = "./wasm-spec-interpreter", optional = true }
|
||||
wasmi = "0.11.0"
|
||||
|
||||
@@ -33,7 +33,7 @@ wasmi = "0.11.0"
|
||||
v8 = "0.44.3"
|
||||
|
||||
[dev-dependencies]
|
||||
wat = "1.0.45"
|
||||
wat = "1.0.47"
|
||||
rand = { version = "0.8.0", features = ["small_rng"] }
|
||||
|
||||
# Only enable the `build-libinterpret` feature when fuzzing is enabled, enabling
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
use arbitrary::{Arbitrary, Result, Unstructured};
|
||||
use std::ops::RangeInclusive;
|
||||
use wasm_encoder::{
|
||||
CodeSection, EntityType, ExportKind, ExportSection, Function, FunctionSection, GlobalSection,
|
||||
ImportSection, Instruction, Module, TableSection, TableType, TypeSection, ValType,
|
||||
CodeSection, ConstExpr, EntityType, ExportKind, ExportSection, Function, FunctionSection,
|
||||
GlobalSection, ImportSection, Instruction, Module, TableSection, TableType, TypeSection,
|
||||
ValType,
|
||||
};
|
||||
|
||||
/// A description of a Wasm module that makes a series of `externref` table
|
||||
@@ -94,7 +95,7 @@ impl TableOps {
|
||||
val_type: wasm_encoder::ValType::ExternRef,
|
||||
mutable: true,
|
||||
},
|
||||
&Instruction::RefNull(wasm_encoder::ValType::ExternRef),
|
||||
&ConstExpr::ref_null(wasm_encoder::ValType::ExternRef),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ ocaml-interop = { version = "0.8", optional = true }
|
||||
once_cell = { version = "1.12.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wat = "1.0.45"
|
||||
wat = "1.0.47"
|
||||
|
||||
[features]
|
||||
build-libinterpret = ["ocaml-interop", "once_cell"]
|
||||
|
||||
Reference in New Issue
Block a user