You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile the vendored RBS C parser to wasm with the WASI SDK's clang
(via WASI_SDK_PATH), and generate the FFI bindings against the host
target (--target=$HOST, layout_tests off) rather than the wasm target.
Running bindgen against the wasm target is libclang-version-fragile:
some libclangs drop all function declarations, others emit the
forward-referenced node structs (rbs_namespace, rbs_type_name,
rbs_ast_symbol, ...) as opaque, which breaks the generated layout
assertions. The emitted #[repr(C)] declarations are layout-portable,
so generating them for the host and compiling them for wasm32 is both
correct and reliable. Mirrors ruby-prism-sys's wasm build support.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments