Skip to content

Instantly share code, notes, and snippets.

View avrabe's full-sized avatar
🐽
wasm wasm wasm

Ralf Anton Beier avrabe

🐽
wasm wasm wasm
View GitHub Profile
@avrabe
avrabe / merged.wat
Created May 29, 2026 19:57
loom#145 repro — Z3 SortDiffers(BitVec64 vs 32) + unwrap-None panics in inline_functions on i64-heavy module. merged.wat = wasm-ld merge of gale-ffi wasm32 staticlib + clang wasm32 host shim (~1MB).
This file has been truncated, but you can view the full file.
(module $merged.wasm
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32 i32)))
(type (;2;) (func (param i32)))
(type (;3;) (func (param i32 i32) (result i32)))
(type (;4;) (func))
(type (;5;) (func (param i32 i32 i32 i32 i32 i32)))
(type (;6;) (func (param i32 i32 i32)))
(type (;7;) (func (param i32 i32 i32 i32)))
@avrabe
avrabe / merged.both.wat
Created May 29, 2026 19:56
synth#167 repro — arm backend lowers wasm calls to __meld_dispatch_import placeholder (no relocations/inlining). mini.wat = minimal 2-func no-import case; merged.both.wat = real gale z_impl_k_sem_give + gale_k_sem_give_decide seam.
(module $merged.both.wasm
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32 i32)))
(type (;2;) (func (param i32)))
(type (;3;) (func (param i32 i32) (result i32)))
(type (;4;) (func))
(type (;5;) (func (param i32 i32 i32) (result i64)))
(import "env" "k_spin_lock" (func $k_spin_lock (;0;) (type 0)))
(import "env" "z_unpend_first_thread" (func $z_unpend_first_thread (;1;) (type 0)))
(import "env" "arch_thread_return_value_set" (func $arch_thread_return_value_set (;2;) (type 1)))
@avrabe
avrabe / gist:057880a37145ae339d4375e511873f74
Last active February 1, 2026 13:14
wit-bindgen 0.51.0 C++ backend bugs - minimal reproducers for upstream issues #1513 and #1514
# wit-bindgen 0.51.0 C++ Backend Issues
Minimal reproducers for upstream issues [#1513](https://github.com/bytecodealliance/wit-bindgen/issues/1513) and [#1514](https://github.com/bytecodealliance/wit-bindgen/issues/1514).
## Setup
```bash
# Download wit-bindgen 0.51.0
curl -LO https://github.com/bytecodealliance/wit-bindgen/releases/download/v0.51.0/wit-bindgen-0.51.0-aarch64-macos.tar.gz
tar xzf wit-bindgen-0.51.0-aarch64-macos.tar.gz