Skip to content

wasm32 ReleaseSafe build fails: 64-bit atomics in io_helper/preview_shm not supported on wasm32 #618

@apotema

Description

@apotema

wasm32-emscripten ReleaseSafe builds of a generated game fail: std/atomic.zig:53: error: expected 32-bit integer type or smaller; found 64-bit integer type (compile lib game ReleaseSafe wasm32-emscripten). wasm32 baseline does not support 64-bit atomics. Sources in engine code compiled for wasm: io_helper.zig:26 std.atomic.Mutex (since #590, ~May 26), and preview_shm.zig:607/676 + preview_iosurface.zig:361 (@atomicStore/@atomicLoad(u64,...)). Pre-existing (predates the controller work); surfaced by labelle-cli Docker Build Test -> "Test --docker WASM build". Fix: use 32-bit atomics / a wasm-safe lock, or guard these for wasm32. Found during gamepad cleanup but independent of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions