Skip to content

2026-08-22

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 22 Aug 01:52
No-op generic typetag registration on wasm

Summary:
The starlark-rust OSS CI wasm job (`ci_oss_wasmtime.sh`, mirrored internally by `fbcode//buck2/scripts/oss:starlark-rust-oss`) builds `starlark` for `wasm32-wasip1`. Since the generic typetag auto-registration landed (`matchers.rs` / `function.rs` monomorphization constructors, 2026-08-13), that build dies in `__pagable_emit_generic_typetag_registration!`'s catch-all arm:

```
error: generic pagable typetag registration supports only 64-bit Linux/macOS and x86_64/aarch64 Windows
  --> starlark/src/values/typing/type_compiled/matchers.rs:91:1
```

Wasm cannot use the constructor-record approach: `core::arch::asm!` is unsupported on wasm targets, and a wasm image has no loader-run constructor section for a per-monomorphization record anyway. Add a wasm arm that emits no registration — deserializing a generic typetag on wasm then fails with the registry's existing "Unknown type tag" error instead of failing the whole build at compile time. Concrete (`inventory`-based) registrations are unaffected.

Reviewed By: jtbraun

Differential Revision: D116564107

fbshipit-source-id: 826aec636b17a96f18afcf9101f9667c2ddec662