Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
80504d8
Modernize implementation of interface types
alexcrichton Dec 5, 2019
e6c79e5
WIP: formatting
darinmorrison Mar 9, 2020
47ad756
WIP: add stubs for remaining instructions
darinmorrison Mar 10, 2020
b2a2413
WIP: reorder tests
darinmorrison Mar 10, 2020
48b4100
WIP: remove duplicate tests
darinmorrison Mar 10, 2020
e0a359b
WIP: fill out remaining i32-to-* instructions
darinmorrison Mar 10, 2020
37c44f8
WIP: add tests for i32-to-* instructions
darinmorrison Mar 11, 2020
ea3c881
WIP: formatting
darinmorrison Mar 11, 2020
247de2d
WIP: fill out i64-to-* instructions
darinmorrison Mar 11, 2020
a6dedef
WIP: remove unnecessary casts
darinmorrison Mar 11, 2020
7fa6ac8
WIP: add tests for i64-to-* instructions
darinmorrison Mar 11, 2020
c689201
WIP: convert dec constants for overflow to hex
darinmorrison Mar 11, 2020
10dff4c
WIP: fix typo in comment
darinmorrison Mar 11, 2020
52e6858
WIP: formatting
darinmorrison Mar 11, 2020
d0c8112
WIP: extend is_num check for interface types
darinmorrison Mar 12, 2020
4487419
WIP: extend get_wasmtime_type for interface types
darinmorrison Mar 12, 2020
ad76f9f
WIP: fill out *-to-i32* instructions
darinmorrison Mar 12, 2020
467e155
WIP: add tests for *-to-i32* instructions
darinmorrison Mar 12, 2020
83bf9ef
WIP: make integer tests more uniform
darinmorrison Mar 12, 2020
97df822
WIP: fill out *-to-i64 instructions
darinmorrison Mar 12, 2020
b9b06c6
WIP: add tests for *-to-i64 instructions
darinmorrison Mar 12, 2020
dc04dba
Update submodules
darinmorrison Apr 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
396 changes: 175 additions & 221 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fn main() -> anyhow::Result<()> {
test_directory(out, "tests/misc_testsuite", strategy)?;
test_directory_module(out, "tests/misc_testsuite/bulk-memory-operations", strategy)?;
test_directory_module(out, "tests/misc_testsuite/reference-types", strategy)?;
test_directory_module(out, "tests/misc_testsuite/interface-types", strategy)?;
Ok(())
})?;

Expand Down
31 changes: 17 additions & 14 deletions crates/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,35 @@ readme = "README.md"
edition = "2018"

[dependencies]
wasmtime-runtime = { path = "../runtime", version = "0.12.0" }
wasmtime-environ = { path = "../environ", version = "0.12.0" }
wasmtime-jit = { path = "../jit", version = "0.12.0" }
wasmtime-profiling = { path = "../profiling", version = "0.12.0" }
wasmparser = "0.51.2"
target-lexicon = { version = "0.10.0", default-features = false }
anyhow = "1.0.19"
region = "2.0.0"
libc = "0.2"
cfg-if = "0.1.9"
backtrace = "0.3.42"
rustc-demangle = "0.1.16"
cfg-if = "0.1.9"
lazy_static = "1.4"
libc = "0.2"
region = "2.0.0"
rustc-demangle = "0.1.16"
target-lexicon = { version = "0.10.0", default-features = false }
wasmparser = "0.51.2"
wasmtime-environ = { path = "../environ", version = "0.12.0" }
wasmtime-jit = { path = "../jit", version = "0.12.0" }
wasmtime-profiling = { path = "../profiling", version = "0.12.0" }
wasmtime-runtime = { path = "../runtime", version = "0.12.0" }
wat = { version = "1.0.10", optional = true }
wit-parser = "0.1.1"
wit-schema-version = "0.1"
wit-validator = "0.1"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = "0.3.7"

[dev-dependencies]
# for wasmtime.rs
wasi-common = { path = "../wasi-common", version = "0.12.0" }
file-per-thread-logger = "0.1.1"
pretty_env_logger = "0.3.0"
rayon = "1.2.1"
file-per-thread-logger = "0.1.1"
wat = "1.0.10"
tempfile = "3.1"
wasi-common = { path = "../wasi-common", version = "0.12.0" }
wat = "1.0.10"
wit-text = "0.5"

[badges]
maintenance = { status = "actively-developed" }
Expand Down
18 changes: 11 additions & 7 deletions crates/api/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,17 @@ impl Instance {

let mut exports = Vec::with_capacity(module.exports().len());
for export in module.exports() {
let name = export.name().to_string();
let export = instance_handle.lookup(&name).expect("export");
exports.push(Extern::from_wasmtime_export(
store,
instance_handle.clone(),
export,
));
let export = match module.inner.export_map[export.name()] {
crate::module::Export::Core => {
let export = instance_handle.lookup(export.name()).expect("export");
Extern::from_wasmtime_export(store, instance_handle.clone(), export)
}
crate::module::Export::Adapter(idx) => {
let func = Module::adapter(module, instance_handle.clone(), idx);
Extern::Func(func)
}
};
exports.push(export);
}
module.register_frame_info();
Ok(Instance {
Expand Down
Loading