Skip to content

Sassembly v0.3.0 — it runs in a browser

Latest

Choose a tag to compare

@aaryavrate aaryavrate released this 27 Sep 05:12

Sassembly now runs in a browser. Type Devanagari assembly, press चालय, and the page assembles it and executes it in your tab — no install, no server, no sign-in.

▸ Open the playground

What is new

Two crates compiled to wasm, and the hand-written glue that drives them:

crates/sadhana-wasm 401 KB Devanagari assembly → ELF
crates/yantra-wasm 75 KB an RV64 machine that runs the ELF
web/ no wasm-bindgen, no generated bindings

Both are instantiated with an empty import object. That is the claim rather than an omission: nothing grants them a syscall, a clock or a socket, because there is nothing for them to ask for.

Measured, in a fresh clone of this repository

2026-09-27, 54 s from cold:

  namaste      proof 848 bytes  sha256 bf2bca26637bc84d
  bare-metal   proof 856 bytes  sha256 d92d476f3ede6e90
  atithi       app   720 bytes  sha256 68655059ec1ab5ba
  wasm         75314 bytes
wrote sassembly.html (109576 bytes) — open it directly, no server needed

Those three hashes are the bytes the upstream tree produces, from the same sources, on a different path.

End to end through the same glue the page uses — assembling each, then running it:

  namaste      848 octets  run   code=0  "नमस्ते संसार"
  bare-metal   856 octets  run   code=0
  atithi       720 octets  host  code=0  "अतिथिः"

Build the standalone page yourself

rustup target add wasm32-unknown-unknown
tools/build-sassembly-web.sh          # writes to a temp dir; pass a path to choose

One self-contained HTML file. The ELF in it came out of sadhana seconds earlier, in that run, from the tracked source — the page is generated rather than committed so that it cannot go stale against the assembler.

What this is not

The browser assembles .sas, not .t1. This is Sassembly assembly, the layer with kāraka sigils on operands. The .t1 systems language the compiler itself is written in needs t1_image and the spec/ tables, and is not compiled in the browser.

Nothing about the fixpoint changes. Stage 2 == Stage 1, 1,393,602 octets, byte for byte, from 21 .t1 sources — as it was in v0.2.0. This release adds a way to see the thing work without waiting 47 minutes for it.

Everything in What this cannot do still holds: no files, no arguments, no clock, no network.

One detail before you write your own program

A bare-metal proof is linked at the reset vector; a hosted application at 0x2000_0000, because the reset vector sits inside the supervisor's own gigabyte. Assemble an application at the wrong address and the refusal arrives from the loader, a stage later, talking about superpages. Sadhana.BARE_METAL and Sadhana.APP_LOAD in web/sadhana.mjs are those two addresses, and the playground picks per sample.


MIT. Come read the compiler with us: discord.gg/XvYvXR8HAh