tweag / asterius
- вторник, 5 февраля 2019 г. в 00:15:46
WebAssembly
A Haskell to WebAssembly compiler
A Haskell to WebAssembly compiler. Project status: alpha, in active development, some simple examples already work.
See the documentation for further instructions. Or check our blog posts:
Also, we've added Weekly Status Reports in case you're interested where the bleeding edge has reached.
We provide pre-built Docker images. Put the input .hs
program in a directory and map the directory to a Docker volume:
terrorjack@ubuntu:~$ docker run -it -v ~/mirror:/mirror terrorjack/asterius
root@76bcb511663d:~# cd /mirror
root@76bcb511663d:/mirror# ahc-link --help
...
See the help text of ahc-link
for further instructions.
What works currently:
ghc-prim
/integer-simple
/base
/array
/deepseq
/containers
/transformers
/mtl
/pretty
/bytestring
/binary
/xhtml
. IO is achieved via rts primitives like print_i64
or JavaScript FFI.Integer
operations backed by BigInt
s.foreign import javascript
syntax. First-class JSVal
type in Haskell land.foreign export javascript
syntax. Haskell closures can be passed between Haskell/JavaScript boundary via StablePtr
.binaryen
/wabt
raw bindings, plus a monadic EDSL to construct WebAssembly code directly in Haskell.BigInt
, no special requirements on the underlying JavaScript engine at the moment.Better check the fib
, jsffi
, array
, rtsapi
and teletype
test suites first to get some idea on current capabilities of asterius
.
Asterius is maintained by Tweag I/O.
Have questions? Need help? Tweet at @tweagio.