malloc, or something lower level like
mmap, or higher level like
MutableByteArray#primitives; in asterius we have our block allocator backed by the wasm linear memory and imo it should be near native performance
stackis not enough; you need to wipe
~/.stackcompletely, and build
asteriusfirst; then the custom bindist of
8.6.5will get picked up. This also means that any other local
stackprojects will need rebuilding, so it's a very big hammer and should be used with care!
I think I found something. This is what I get when I run
stack build -v on a debian:unstable image:
2019-09-04 02:04:12.833011: [debug] Process finished in 1ms: /sbin/ldconfig -p 2019-09-04 02:04:12.833621: [debug] Did not find shared library libtinfo.so.5 2019-09-04 02:04:12.833690: [debug] Found shared library libtinfo.so.6 in 'ldconfig -p' output 2019-09-04 02:04:12.833775: [debug] Found shared library libncursesw.so.6 in 'ldconfig -p' output 2019-09-04 02:04:12.833875: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output 2019-09-04 02:04:12.833981: [debug] Did not find shared library libgmp.so.3 2019-09-04 02:04:12.834051: [debug] *Potential GHC builds: tinfo6, ncurses6* 2019-09-04 02:04:12.834146: [debug] Found already installed GHC builds: 2019-09-04 02:04:13.203637: [debug] Trying to setup GHC build: tinfo6 2019-09-04 02:04:13.203874: [info] Preparing to install GHC (tinfo6) to an isolated location.
whereas for ubuntu:18.04 image, I get the following:
2019-09-04 02:05:52.970346: [debug] Process finished in 5ms: /sbin/ldconfig -p 2019-09-04 02:05:52.970489: [debug] Found shared library libtinfo.so.5 in 'ldconfig -p' output 2019-09-04 02:05:52.970735: [debug] Did not find shared library libtinfo.so.6 2019-09-04 02:05:52.970830: [debug] Did not find shared library libncursesw.so.6 2019-09-04 02:05:52.970906: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output 2019-09-04 02:05:52.970996: [debug] Did not find shared library libgmp.so.3 2019-09-04 02:05:52.971534: [debug] *Potential GHC builds: standard* 2019-09-04 02:05:52.971624: [debug] Found already installed GHC builds: 2019-09-04 02:05:53.234965: [debug] Trying to setup GHC build: standard 2019-09-04 02:05:53.235086: [info] Preparing to install GHC to an isolated location.
random. Is there any way to link libraries in the current implementation? Thanks
Main.html:1 Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
ahc-cabal. It's a wrapper to
cabal-install, so you should just do
ahc-cabal new-build, etc, and use 3rd party libraries just like a regular cabal package. It's possible to use
new-install --installdir .to create a symlink of the pseudo-executable, and then later use
ahc-distto extract the wasm/mjs artifacts from the pseudo-executable. I haven't written this in the documentation yet, will do later.
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.