Giter Club home page Giter Club logo

asterius's Introduction

Asterius: A Haskell to WebAssembly compiler

CircleCI AppVeyor

A Haskell to WebAssembly compiler. Project status: alpha, in active development, some simple examples already work.

See the documentation for further instructions.

Quick start

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:

  • All GHC language features except Template Haskell.
  • Non-IO parts in ghc-prim/integer-simple/base/array/deepseq/containers/transformers/mtl/pretty. IO is achieved via rts primitives like print_i64 or JavaScript FFI.
  • Importing JavaScript expressions via the foreign import javascript syntax. First-class JSRef type in Haskell land.
  • Invoking RTS API on the JavaScript side to manipulate Haskell closures and trigger evaluation.
  • A debugger which outputs memory loads/stores and control flow transfers.
  • A monadic EDSL to construct WebAssembly code directly in Haskell.
  • Besides WebAssembly MVP & the experimental BigInt support, no special requirements on the underlying JavaScript engine.

Better check the fib, jsffi, array and rtsapi test suites first to get some idea on current capabilities of asterius.

Sponsors

Asterius is maintained by Tweag I/O.

Have questions? Need help? Tweet at @tweagio.

asterius's People

Contributors

mboes avatar mrkkrp avatar terrorjack avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.