Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wasm-tools to 0.225.0 #371

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
105 changes: 60 additions & 45 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ warg-crypto = "0.9.0"
warg-protocol = "0.9.0"
warg-server = "0.9.0"
wasi-preview1-component-adapter-provider = "29.0.1"
wasm-metadata = "0.220.0"
wasm-metadata = "0.225.0"
wasm-pkg-client = "0.9.0"
wasmparser = "0.220.0"
wasmprinter = "0.220.0"
wasmparser = "0.225.0"
wasmprinter = "0.225.0"
wat = "1.220.0"
which = "6.0.1"
wit-bindgen-core = "0.36.0"
wit-bindgen-rust = "0.36.0"
wit-component = "0.220.0"
wit-parser = "0.220.0"
wit-bindgen-core = "0.39.0"
wit-bindgen-rust = "0.39.0"
wit-component = "0.225.0"
wit-parser = "0.225.0"

[profile.release]
panic = "abort"
Expand Down
5 changes: 4 additions & 1 deletion src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use indexmap::{IndexMap, IndexSet};
use semver::Version;
use wasm_pkg_client::PackageRef;
use wit_bindgen_core::Files;
use wit_bindgen_rust::{Opts, WithOption};
use wit_bindgen_rust::{AsyncConfig, Opts, WithOption};
use wit_component::DecodedWasm;
use wit_parser::{
Interface, Package, PackageName, Resolve, Type, TypeDefKind, TypeOwner, UnresolvedPackageGroup,
Expand Down Expand Up @@ -134,6 +134,9 @@ impl<'a> BindingsGenerator<'a> {
pub_export_macro: settings.pub_export_macro,
generate_unused_types: settings.generate_unused_types,
disable_custom_section_link_helpers: settings.disable_custom_section_link_helpers,

// TODO: pipe this through to the CLI options, requires valid serde impls
async_: AsyncConfig::None,
};

let mut files = Files::default();
Expand Down
9 changes: 5 additions & 4 deletions src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,9 @@ impl<'a> UnimplementedFunction<'a> {
self.print_optional_type(ty.as_ref(), trie, source)?;
source.push('>');
}
TypeDefKind::Stream(stream) => {
TypeDefKind::Stream(ty) => {
source.push_str("Stream<");
self.print_optional_type(stream.element.as_ref(), trie, source)?;
source.push_str(", ");
self.print_optional_type(stream.end.as_ref(), trie, source)?;
self.print_optional_type(ty.as_ref(), trie, source)?;
source.push('>');
}
TypeDefKind::Type(ty) => self.print_type(ty, trie, source)?,
Expand All @@ -425,6 +423,9 @@ impl<'a> UnimplementedFunction<'a> {
TypeDefKind::Resource => {
bail!("unsupported anonymous resource type found in WIT package")
}
TypeDefKind::ErrorContext => {
bail!("unsupported error context type found in WIT package")
}
TypeDefKind::Unknown => unreachable!(),
}

Expand Down
Loading