ahc-cabal. The "pure haskell" packages should just work fine, like
lens, but there also exist packages which compile but won't work at the moment due to cbits (like
cryptonite). Good timing to give it another try :)
https://www.tweag.io/wasm-todomvc/todomvc.wasmis only 81.3 KB, but when I compile it with
ahc-link .. --browser --bundle-> its 2.1 MB? what am I doing differently?
binaryenbackend and performs shrinking, so you may get smaller wasm binary again
diagramsin your browser!
ahc-cabaland then run
ahc-diston it. I tried disabling optimizations and shrinking but I still get a
StackOverflowexception even though I believe I shouldn't be getting it.
ahc-linkunder the hood so I'll just try aliasing it for now.
--verbose-err. it gives me the same exception as before.
res_cis a really large number and the issue can be solved by changing
BigInt(offset), but I do not know if
res_cshould be such a large number.
RuntimeErrornow which is being thrown here: https://github.com/tweag/asterius/blob/master/asterius/rts/rts.gc.mjs#L882 because the switch statement doesn't handle indirection with the case
this.memory.i64Load(c + rtsConstants.offset_StgInd_indirectee)then it's
gc times increase linearly over time
It's somewhat expected behavior, since we don't do generational gc yet and is based on a naive copying gc implementation for now, so gc time (when it actually happens) is dependent on heap resident data size
Hiya friends, I've been taking a look at Asterius and am really amazed by how well everything already works! I'm currently trying to attach event listeners, but am running into some trouble:
This is my foreign import, and this is the wrapper I make around it:
addEventListener :: DOMNode -> String -> (JSVal -> IO ()) -> IO () addEventListener node eventName _callback = do -- Temporary, just trying to get *something* out of Haskell cb <- makeHaskellCallback (putStrLn "Got callback") ffi_addEventListener (coerce node) (toJSString eventName) cb
Unfortunately, I never end up getting anything back...
Whenever I change the ffi import to
I do in fact get a console message, but it's a Promise that has already resolved by then. Does this have something to do with laziness?