Skip to content

Commit 4e1ec7d

Browse files
authored
Support wasmparser 0.244.0 breaking API changes (#1194)
wasmparser 0.244.0 introduced breaking changes from PR #2376 which bakes async into component model function types. This adds an async_ field to ComponentFuncType and a new Map variant to ComponentDefinedType. Since Hyperlight does not yet support async component model features, we handle these new API additions by panicking with clear error messages, consistent with how Future and Stream types are already handled. This unblocks the Dependabot PR #1156 which was failing CI due to these breaking changes. Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent df35fab commit 4e1ec7d

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hyperlight_component_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "hyperlight_component_macro"
1616
proc-macro = true
1717

1818
[dependencies]
19-
wasmparser = { version = "0.243.0" }
19+
wasmparser = { version = "0.244.0" }
2020
quote = { version = "1.0.44" }
2121
proc-macro2 = { version = "1.0.106" }
2222
syn = { version = "2.0.114" }

src/hyperlight_component_util/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Shared implementation for the procedural macros that generate Hyperlight host an
1515
name = "hyperlight_component_util"
1616

1717
[dependencies]
18-
wasmparser = { version = "0.243.0" }
18+
wasmparser = { version = "0.244.0" }
1919
quote = { version = "1.0.44" }
2020
proc-macro2 = { version = "1.0.106" }
2121
syn = { version = "2.0.114" }

src/hyperlight_component_util/src/elaborate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,16 @@ impl<'p, 'a> Ctx<'p, 'a> {
439439
ComponentDefinedType::Future(_) | ComponentDefinedType::Stream(_) => {
440440
panic!("async not yet supported")
441441
}
442+
ComponentDefinedType::Map(_, _) => {
443+
panic!("map type not yet supported")
444+
}
442445
}
443446
}
444447

445448
fn elab_func<'c>(&'c mut self, ft: &ComponentFuncType<'a>) -> Result<Func<'a>, Error<'a>> {
449+
if ft.async_ {
450+
panic!("async not yet supported")
451+
}
446452
Ok(Func {
447453
params: ft
448454
.params

0 commit comments

Comments
 (0)