reflex
or miso
out of the box yet, since the syntax/semantics of JSFFI still somewhat differs from ghcjs. At least for calling to WebGL libs and generating shader code on the fly in Haskell, asterius is already capable of that; although there isn't a WebIDL processor yet so bindings need to be hand written
asterius-examples
instead of lengthy docs. If you think a self-contained example smaller than todomvc which still calls web api is more favorable, do let me know and I can add one later
var importObject = { imports: { imported_func: arg => console.log(arg) } };
WebAssembly.instantiateStreaming( fetch ('/mirror/simplest-hello-world.wasm'), importObject ).then ( wasm => {
console.log('Wasm read')
window.wasm = wasm;
})
ahc-link --input-hs simplest-hello-world.hs
main = putStrLn "Hello World"
Uncaught (in promise) TypeError: WebAssembly.instantiate(): Import #0 module="WasmMemory" error: module is not an object or function
stack.yaml
, and if a ghc-8.6.5
installation already exists in your ~/.stack/programs
then our custom version won't be installed, resulting in the error. I'll add the reminder in the docs later