Skip to content

Commit 3afef57

Browse files
dependabot[bot]dependabot-pr-auto-approver[bot]jsturtevant
authored
chore(deps): bump wasmparser from 0.248.0 to 0.249.0 (#1461)
* chore(deps): bump wasmparser from 0.248.0 to 0.249.0 Bumps [wasmparser](https://github.com/bytecodealliance/wasm-tools) from 0.248.0 to 0.249.0. - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) --- updated-dependencies: - dependency-name: wasmparser dependency-version: 0.249.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: update guest Cargo.lock files Automatically updated by dependabot-update-guest-locks workflow. Triggered by: chore(deps): bump wasmparser from 0.248.0 to 0.249.0 Signed-off-by: dependabot-pr-auto-approver[bot] <207571483+dependabot-pr-auto-approver[bot]@users.noreply.github.com> * fix: update for wasmparser 0.249 API changes Signed-off-by: James Sturtevant <jsturtevant@gmail.com> * chore: remove unused macro wasmparser dependency Signed-off-by: James Sturtevant <jsturtevant@gmail.com> * refactor: clarify component extern name access Signed-off-by: James Sturtevant <jsturtevant@gmail.com> * chore: update guest Cargo.lock files Automatically updated by dependabot-update-guest-locks workflow. Triggered by: chore(deps): bump wasmparser from 0.248.0 to 0.249.0 Signed-off-by: dependabot-pr-auto-approver[bot] <207571483+dependabot-pr-auto-approver[bot]@users.noreply.github.com> (cherry picked from commit 6a15a6a) --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot-pr-auto-approver[bot] <207571483+dependabot-pr-auto-approver[bot]@users.noreply.github.com> Signed-off-by: James Sturtevant <jsturtevant@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot-pr-auto-approver[bot] <207571483+dependabot-pr-auto-approver[bot]@users.noreply.github.com> Co-authored-by: James Sturtevant <jsturtevant@gmail.com>
1 parent fd5716f commit 3afef57

6 files changed

Lines changed: 37 additions & 24 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 4 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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ name = "hyperlight_component_macro"
1616
proc-macro = true
1717

1818
[dependencies]
19-
wasmparser = { version = "0.248.0" }
2019
quote = { version = "1.0.45" }
2120
proc-macro2 = { version = "1.0.106" }
2221
syn = { version = "2.0.117" }

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.248.0" }
18+
wasmparser = { version = "0.249.0" }
1919
quote = { version = "1.0.45" }
2020
proc-macro2 = { version = "1.0.106" }
2121
syn = { version = "2.0.117" }

src/hyperlight_component_util/src/component.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use wasmparser::Payload::{
2020
ComponentAliasSection, ComponentExportSection, ComponentTypeSection, Version,
2121
};
2222
use wasmparser::{
23-
ComponentAlias, ComponentExternalKind, ComponentOuterAliasKind, ComponentType,
24-
ComponentTypeRef, Payload,
23+
ComponentAlias, ComponentExternName, ComponentExternalKind, ComponentOuterAliasKind,
24+
ComponentType, ComponentTypeRef, Payload,
2525
};
2626

2727
use crate::etypes::{Component, Ctx, Defined};
@@ -118,7 +118,7 @@ pub fn read_component_single_exported_type<'a>(
118118
// picks the world index if world_name is passed in the proc_macro
119119
// else picks the index of last type, exported by core module
120120
if let Some(world) = world_name.as_ref() {
121-
let name = ce.name.0;
121+
let ComponentExternName { name, .. } = ce.name;
122122
if name.eq_ignore_ascii_case(world) {
123123
selected_type_idx = Some(ctx.types.len() - 1);
124124
}

src/hyperlight_component_util/src/elaborate.rs

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ limitations under the License.
2424
//! substitute.rs for more details of the approach here).
2525
2626
use wasmparser::{
27-
ComponentAlias, ComponentDefinedType, ComponentFuncType, ComponentOuterAliasKind,
28-
ComponentType, ComponentTypeDeclaration, ComponentTypeRef, ComponentValType,
29-
CompositeInnerType, CoreType, InstanceTypeDeclaration, ModuleTypeDeclaration, OuterAliasKind,
30-
PrimitiveValType, TypeBounds, TypeRef,
27+
ComponentAlias, ComponentDefinedType, ComponentExternName, ComponentFuncType,
28+
ComponentOuterAliasKind, ComponentType, ComponentTypeDeclaration, ComponentTypeRef,
29+
ComponentValType, CompositeInnerType, CoreType, InstanceTypeDeclaration, ModuleTypeDeclaration,
30+
OuterAliasKind, PrimitiveValType, TypeBounds, TypeRef,
3131
};
3232

3333
use crate::etypes::{
@@ -536,13 +536,19 @@ impl<'p, 'a> Ctx<'p, 'a> {
536536
self.add_core_or_component_ed(ed);
537537
Ok(None)
538538
}
539-
InstanceTypeDeclaration::Export { name, ty } => {
539+
InstanceTypeDeclaration::Export {
540+
name: export_name,
541+
ty,
542+
} => {
543+
let ComponentExternName {
544+
name: kebab_name, ..
545+
} = *export_name;
540546
let (vs, ed) = self.elab_extern_desc(ty)?;
541-
let sub = self.bound_to_evars(Some(name.0), &vs);
547+
let sub = self.bound_to_evars(Some(kebab_name), &vs);
542548
let ed = sub.extern_desc(&ed).not_void();
543549
self.add_ed(&ed);
544550
Ok(Some(ExternDecl {
545-
kebab_name: name.0,
551+
kebab_name,
546552
desc: ed,
547553
}))
548554
}
@@ -634,27 +640,37 @@ impl<'p, 'a> Ctx<'p, 'a> {
634640
self.add_core_or_component_ed(ed);
635641
Ok((None, None))
636642
}
637-
ComponentTypeDeclaration::Export { name, ty, .. } => {
643+
ComponentTypeDeclaration::Export {
644+
name: export_name,
645+
ty,
646+
..
647+
} => {
648+
let ComponentExternName {
649+
name: kebab_name, ..
650+
} = *export_name;
638651
let (vs, ed) = self.elab_extern_desc(ty)?;
639-
let sub = self.bound_to_evars(Some(name.0), &vs);
652+
let sub = self.bound_to_evars(Some(kebab_name), &vs);
640653
let ed = sub.extern_desc(&ed).not_void();
641654
self.add_ed(&ed);
642655
Ok((
643656
None,
644657
Some(ExternDecl {
645-
kebab_name: name.0,
658+
kebab_name,
646659
desc: ed,
647660
}),
648661
))
649662
}
650663
ComponentTypeDeclaration::Import(i) => {
664+
let ComponentExternName {
665+
name: kebab_name, ..
666+
} = i.name;
651667
let (vs, ed) = self.elab_extern_desc(&i.ty)?;
652-
let sub = self.bound_to_uvars(Some(i.name.0), &vs, true);
668+
let sub = self.bound_to_uvars(Some(kebab_name), &vs, true);
653669
let ed = sub.extern_desc(&ed).not_void();
654670
self.add_ed(&ed);
655671
Ok((
656672
Some(ExternDecl {
657-
kebab_name: i.name.0,
673+
kebab_name,
658674
desc: ed,
659675
}),
660676
None,

src/tests/rust_guests/witguest/Cargo.lock

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

0 commit comments

Comments
 (0)