Skip to content

WASI phase 1: perry-runtime builds for 32-bit (ILP32) targets #11376

Description

@proggeramlug

Part of #11375.

perry-runtime assumes 64-bit pointers in several places that fail to compile on any ILP32 target (wasm32, and also arm64_32-apple-watchos, which has silently stopped building):

  • closure/box_captures.rs: FRAME_RELEASED: usize = 1 << 63, tag shift 60 on usize
  • layout asserts pinned to LP64 values: ObjectHeader.meta offset, ArrayHeader size, MapHeader.used, SetHeader.used, HotTls inline-state/implicit-this offsets, ShadowStackState.len, size_of::<Box>()
  • native_handle.rs type mismatch

These asserts exist to keep inline codegen in sync; on ILP32 they must assert the values perry-codegen/src/target_layout.rs emits for the target, not LP64 constants.

Done when: the ILP32 error family is gone from cargo check -p perry-runtime --target wasm32-wasip2 --no-default-features (remaining errors are platform-gating only, phase 2), with a note of how the check was run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions