Weblings is a Rust compiler toolchain compiled to WebAssembly that lets you compile and execute Rust code entirely in your browser, with a web UI featuring a playground and Rustlings exercises.

Stars

84

7-day growth

No data

Forks

2

Open issues

0

License

MIT

Last updated

2026-07-25

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It provides a fully client-side Rust compiler toolchain using Cranelift instead of LLVM, with novel translation from Cranelift IR to Waffle IR and a custom Wasm linker, all enabled by compiling rustc to WASM.

Who it is for

  • Rust learners seeking instant feedback in the browser
  • Web developers interested in in-browser compilation
  • Educators teaching computer memory or Rust concepts
  • Toolchain enthusiasts exploring alternative Rust backends

Use cases

  • Running Rust code snippets interactively without a server
  • Completing the Rustlings exercise suite in the browser
  • Demonstrating memory visualization during Rust code execution
  • Experimenting with Cranelift-based Rust compilation in WebAssembly

Strengths

  • Entirely client-side execution removes server dependency
  • Novel Cranelift-to-Waffle-to-Wasm pipeline offers a unique approach
  • Leverages well-established rustc compiled to WASM for compatibility
  • Includes a practical web UI with both a playground and Rustlings

Considerations

  • Experimental and may have stability or performance issues
  • AI‑generated components (linker, CLIF‑to‑Waffle) may need upstream maintenance
  • Limited to Cranelift backend; LLVM‐based compilation is not available

README quick start

Weblings

Weblings is a Rust compiler toolchain compiled to WASM. This means that you can compile and execute Rust code in your browser!

Tech stack tl;dr rust code -> rustc -> cranelift IR -> waffle -> wasm object files -> linker -> wasm executable -> browser execution

The web UI

The primary way to interface with this WASM toolchain is through the web UI, which you can access at https://weblings.forest-anderson.ca. It has two sections:

The stack

A few things had to be set up to get this toolchain working:

⭐ - these steps were written with AI tooling to achieve the goals of this project, but I'd love to see them included in Cranelift/Wild, and hope to find a way to upstream them!

Why?

I've set up this toolchain so that I can build out some tooling that I'll be using in upcoming projects to teach computer memory principles. I'v

Description

Compiling Rust to WASM from inside WASM!

Related repositories

Similar projects matched by category, topics, and programming language.

l0ng-ai
Featured
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

Developer ToolsCLI & Terminal
359
m-novotny
Featured
m-novotny GitHub avatar

memguard-rs

A Rust library that provides secure memory handling primitives including zeroization on drop, memory locking, constant-time comparison, and compile-time guarded regions, with zero dependencies and no_std support.

Embedded & IoTSecurity
131
inbjo
inbjo GitHub avatar

MirrorProxy

MirrorProxy is a self-hosted, Rust-based mirror proxy platform with an embedded React admin console and cross-platform client for managing package sources.

Rust
204