Get the latest tech news
Compiling Bigloo Scheme to WebAssembly
An exploration of compiling Scheme and potentially JavaScript to WebAssembly.
The function pointer's C type cannot precisely capture the actual behavior even with a uniform value representation, as the arity of the Scheme procedure needs to be represented. It's possible to work around this by using the EMULATE_FUNCTION_POINTER_CASTS Emscripten option to generate stubs that emulate the cast, but it adds significant overheads as the note (emphasis mine): For comparison, Guy Bedford quoted in the JS to Wasm article linked earlier suggested 5-6MB was a reasonable number for a Spidermonkey embedding.
Or read this on Hacker News