Skip to content

Commit

Permalink
deps: update to latest Wasmtime@27 toolchain (bytecodealliance#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Nov 20, 2024
1 parent 7b6e386 commit 9e784e2
Show file tree
Hide file tree
Showing 47 changed files with 116 additions and 118 deletions.
180 changes: 93 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ log = "0.4.22"
semver = "1.0.23"
js-component-bindgen = { path = "./crates/js-component-bindgen" }
structopt = "0.3.26"
wasm-encoder = "0.218.0"
wasm-metadata = "0.218.0"
wasmparser = "0.218.0"
wasmprinter = "0.218.0"
wasmtime-environ = { version = "26.0.0", features = [
wasm-encoder = "0.219.1"
wasm-metadata = "0.219.1"
wasmparser = "0.219.1"
wasmprinter = "0.219.1"
wasmtime-environ = { version = "27.0.0", features = [
"component-model",
"compile",
] }
wat = "1.218.0"
wit-bindgen = "0.33.0"
wit-bindgen-core = "0.33.0"
wit-component = { version = "0.218.0", features = ["dummy-module"] }
wit-parser = "0.218.0"
wit-bindgen = "0.34.0"
wit-bindgen-core = "0.34.0"
wit-component = { version = "0.219.1", features = ["dummy-module"] }
wit-parser = "0.219.1"
xshell = "0.2.6"

[dev-dependencies]
Expand Down
12 changes: 2 additions & 10 deletions crates/js-component-bindgen/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ impl Augmenter<'_> {
// records various bits of information about the module within `self`.
for payload in Parser::new(0).parse_all(self.translation.wasm) {
match payload? {
Payload::Version { .. } => {}
Payload::End(_) => {}

Payload::TypeSection(s) => {
for grp in s.into_iter_err_on_gc_types() {
self.types.push(grp?);
Expand All @@ -246,29 +243,22 @@ impl Augmenter<'_> {
self.imports.push(i);
}
}

Payload::ExportSection(s) => {
for e in s {
let e = e?;
self.exports.push(e);
}
}

Payload::FunctionSection(s) => {
for ty in s {
let ty = ty?;
self.local_func_tys.push(ty);
}
}

Payload::CodeSectionStart { .. } => {}
Payload::CodeSectionEntry(body) => {
self.local_funcs.push(body);
}

// Ignore all custom sections for now
Payload::CustomSection(_) => {}

// NB: these sections are theoretically possible to handle but
// are not required at this time.
Payload::DataCountSection { .. }
Expand Down Expand Up @@ -297,6 +287,8 @@ impl Augmenter<'_> {
| Payload::ComponentTypeSection(_) => {
bail!("component section found in module using multiple memories")
}

_ => {}
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/wasm-tools-component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::PathBuf;
use wasm_encoder::{Encode, Section};
use wasm_metadata::Producers;
use wit_component::{ComponentEncoder, DecodedWasm, WitPrinter};
use wit_parser::Resolve;
use wit_parser::{Mangling, Resolve};

use exports::local::wasm_tools::tools::{
EmbedOpts, EnabledFeatureSet, Guest, ModuleMetaType, ModuleMetadata, ProducersFields,
Expand Down Expand Up @@ -122,7 +122,7 @@ impl Guest for WasmToolsJs {
..
}
) {
wit_component::dummy_module(&resolve, world)
wit_component::dummy_module(&resolve, world, Mangling::Standard32)
} else {
if binary.is_none() {
return Err(
Expand Down
Binary file modified lib/wasi_snapshot_preview1.command.wasm
Binary file not shown.
Binary file modified lib/wasi_snapshot_preview1.reactor.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion submodules/WASI-Virt
Submodule WASI-Virt updated 2 files
+8 −22 Cargo.lock
+2 −2 Cargo.toml
2 changes: 1 addition & 1 deletion submodules/wasm-tools
Submodule wasm-tools updated 56 files
+43 −0 .github/actions/install-rust/action.yml
+18 −18 .github/workflows/main.yml
+71 −71 Cargo.lock
+17 −17 Cargo.toml
+1 −1 README.md
+8 −0 crates/wasm-encoder/src/core/types.rs
+1 −1 crates/wasm-metadata/Cargo.toml
+14 −0 crates/wasm-mutate/src/mutators/peephole.rs
+6 −1 crates/wasm-mutate/src/mutators/peephole/dfg.rs
+1 −0 crates/wasm-mutate/src/mutators/peephole/eggsy/analysis.rs
+3 −0 crates/wasm-mutate/src/mutators/peephole/eggsy/encoder/expr2wasm.rs
+35 −0 crates/wasm-mutate/src/mutators/peephole/eggsy/lang.rs
+31 −6 crates/wasm-smith/src/config.rs
+206 −88 crates/wasm-smith/src/core.rs
+24 −19 crates/wasm-smith/src/core/code_builder.rs
+13 −15 crates/wasm-smith/tests/core.rs
+5 −7 crates/wasmparser/Cargo.toml
+4 −4 crates/wasmparser/src/collections/hash.rs
+25 −6 crates/wasmparser/src/features.rs
+3 −2 crates/wasmparser/src/validator/component_types.rs
+60 −6 crates/wasmparser/src/validator/core.rs
+3 −2 crates/wasmparser/src/validator/operators.rs
+4 −2 crates/wasmparser/src/validator/types.rs
+1 −1 crates/wasmprinter/src/print.rs
+1 −1 crates/wast/Cargo.toml
+3 −2 crates/wast/src/core/expr.rs
+8 −1 crates/wast/src/core/memory.rs
+6 −2 crates/wast/src/core/resolve/deinline_import_export.rs
+5 −12 crates/wast/src/core/types.rs
+17 −17 crates/wast/src/lexer.rs
+83 −48 crates/wast/src/token.rs
+2 −4 crates/wast/src/wast.rs
+1 −1 crates/wat/Cargo.toml
+1 −1 crates/wit-component/src/semver_check.rs
+65 −23 crates/wit-encoder/src/from_parser.rs
+32 −5 crates/wit-encoder/src/world.rs
+32 −8 crates/wit-encoder/tests/deps.rs
+27 −17 crates/wit-encoder/tests/parse-to-encoder.rs
+5 −0 crates/wit-parser/src/resolve.rs
+1 −2 fuzz/src/lib.rs
+5 −1 fuzz/src/mutate.rs
+25 −1 src/bin/wasm-tools/component.rs
+3 −3 src/bin/wasm-tools/json_from_wast.rs
+1 −1 src/bin/wasm-tools/validate.rs
+8 −0 tests/cli/component-embed-only-custom.wit
+19 −0 tests/cli/component-embed-only-custom.wit.stdout
+14 −0 tests/cli/semver-check-different-package-versions.wit
+5 −0 tests/cli/semver-check-different-package-versions.wit.stderr
+3 −0 tests/local/table-big.wast
+0 −5 tests/local/table-too-big.wast
+11 −165 tests/roundtrip.rs
+11 −0 tests/snapshots/local/table-big.wast.json
+3 −0 tests/snapshots/local/table-big.wast/0.print
+0 −12 tests/snapshots/local/table-too-big.wast.json
+3 −0 tests/snapshots/testsuite/proposals/memory64/memory.wast.json
+3 −0 tests/snapshots/testsuite/proposals/memory64/table.wast.json
2 changes: 1 addition & 1 deletion submodules/wasmtime
Submodule wasmtime updated 552 files
8 changes: 4 additions & 4 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ export async function apiTest(_fixtures) {
const meta = await metadataShow(newComponent);
deepStrictEqual(meta[0].metaType, {
tag: "component",
val: 4,
val: 5,
});
deepStrictEqual(meta[1].producers, [
[
"processed-by",
[
["wit-component", "0.218.0"],
["wit-component", "0.219.1"],
["dummy-gen", "test"],
],
],
Expand Down Expand Up @@ -189,13 +189,13 @@ export async function apiTest(_fixtures) {
const meta = await metadataShow(newComponent);
deepStrictEqual(meta[0].metaType, {
tag: "component",
val: 1,
val: 2,
});
deepStrictEqual(meta[1].producers, [
[
"processed-by",
[
["wit-component", "0.218.0"],
["wit-component", "0.219.1"],
["dummy-gen", "test"],
],
],
Expand Down
4 changes: 2 additions & 2 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,12 @@ export async function cliTest(_fixtures) {
);
strictEqual(stderr, "");
const meta = JSON.parse(stdout);
deepStrictEqual(meta[0].metaType, { tag: "component", val: 4 });
deepStrictEqual(meta[0].metaType, { tag: "component", val: 5 });
deepStrictEqual(meta[1].producers, [
[
"processed-by",
[
["wit-component", "0.218.0"],
["wit-component", "0.219.1"],
["dummy-gen", "test"],
],
],
Expand Down
Binary file not shown.
Binary file modified test/fixtures/components/borrowing.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/flavorful.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/import-fn.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/lists.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/many-arguments.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/many_arguments.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/numbers.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/options.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/other-dependencies.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/owning.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/records.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource-borrow-simple.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource-import-and-export.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_aggregates.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_alias.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_alias_redux.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_borrow_export.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_borrow_import.component.wasm
Binary file not shown.
Binary file not shown.
Binary file modified test/fixtures/components/resource_borrow_simple.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_floats.component.wasm
Binary file not shown.
Binary file not shown.
Binary file modified test/fixtures/components/resource_into_inner.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resource_with_lists.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/resources.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/results.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/rust_xcrate.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/smoke.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/strings.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/type_section_suffix.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/variants.component.wasm
Binary file not shown.
Binary file modified test/fixtures/components/versions.component.wasm
Binary file not shown.
Binary file modified test/fixtures/env-allow.composed.wasm
Binary file not shown.
Binary file modified test/fixtures/stdio.composed.wasm
Binary file not shown.

0 comments on commit 9e784e2

Please sign in to comment.