Swam Build Status Codacy Badge

WebAssembly implementation in Scala with cats.

Cats Friendly Badge

Join the chat at https://gitter.im/satabin/swam

Getting Started

To build it, we use mill. Mill is not packaged all Linux distributions, but you can use curl to install it (see Installation instructions in the doc):

If you want to run the specification tests, just type:

mill runtime.test

It you want to test swam in a REPL session, just type tostart an ammonite shell with runtime project in classpath.:

mill -i runtime.repl

If you want a REPL session with both runtime and text, the easiest way is to start a session for the runtime.test project:

$ mill -i runtime.test.repl


This project defines several modules:

  • The core module is a library that makes it possible to manipulate binary representation of WebAssembly modules. In particular it contains:
    • a streaming parser for the binary format;
    • a compiler from text to binary format.
  • The runtime module is a non-web embedding to instantiate and run WebAssembly modules.
  • The text module is a library that makes it possible to manipulate text representation of WebAssembly modules. It is not included in the core module as text representation is more of a debug feature, and the runtime does not want to bring that dependency with it.

If you want more details, please refer to the website.