sand-headless prints 2256461126764447066 on native and on wasm32, at -O2 and at -O0, in one dune test run. That is the whole point of the exercise and the reason rand-f32 is written in Flan rather than bound to libc. The old note said the builtins archive has to come from a wasi-sdk release. It does not: emscripten builds the same compiler-rt and it links correctly under the other name. It is a different triple built by a different clang, so it is a substitution rather than the real article, and both the code and the note say so - nobody should read "wasm32 works" without knowing which joint is glued. Two findings the note did not have. The entry point is __main_argc_argv, not main, and the link succeeds before trapping on a signature-mismatched weak stub. And the target has to reach the C compiles as well as the link, since flan_rt.c includes stdio.h. Also corrects why sand is two programs. Two claims had been run together: raylib does work on wasm through emscripten, and a game loop is expressible there with emscripten_set_main_loop - a different main, not a different program. What justifies the split is only that a headless test needs no window on any target. What makes it mandatory is Load collecting a package's C and link flags whether or not anything references the package, and that is the thing to fix.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%