Elm core libs in WebAssembly

I’ve been working on an experiment to implement parts of Elm in WebAssembly. I’ve discussed it with a couple of people, but wanted to share around a bit more and maybe spark some discussions.

This repo implements parts of elm/core in C rather than JS, and compiles it to WebAssembly. It includes:

  • Byte level implementations of all of Elm’s data types
  • First-class functions (currying, higher-order functions, etc.)
  • The basic arithmetic operators (+,-,*,/)
  • Record updates and accessors
  • A working garbage collector designed for Elm

Demos (very low level and basic ones), and docs, are linked in the README.

I’m also working on a fork of the Elm compiler but I don’t really have anything worth sharing on that just yet.

By the way, I should probably also be clear that this is an experimental hobby project by some random guy. There’s nothing official about it!

Let me know what you think!

55 Likes