Skip to content

A toy compiler for the "Compiling to WASM from scratch" BornHack 2024 talk

Notifications You must be signed in to change notification settings

volesen/compile-to-wasm-from-scratch

Repository files navigation

compile-to-wasm-from-scratch

A simple example of compiling a minimal language to WebAssembly from scratch.

Example

def sum_to(n) =
    if n then
        n + sum_to(n - 1)
    else
        0

Usage

Prerequisites:

Install the dependencies:

opam install core

Run a .ctwfs file:

sh run.sh examples/sum_to.ctwfs

About

A toy compiler for the "Compiling to WASM from scratch" BornHack 2024 talk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published