DX-WASM Engine 🚀

Ahead-of-Time Compiler & Custom DSL built from scratch in Rust

Rust 2021 WASM Bytecode Active Dev

⚡ Live AST & Bytecode Visualizer

Modify the custom DX code below to see how the recursive-descent parser constructs the AST and maps it into raw native WebAssembly primitives.

compiler.dx (Source Input)
Abstract Syntax Tree (AST)
Loading parser state...
Raw WebAssembly Byte Stream (Hex Dump)
Loading binary pipeline...

📐 Architectural Specification

1. Lexical Analysis & Tokenization

The compilation pipeline bypasses heavy consumer frameworks. The custom Rust Lexer processes raw character streams directly into isolated lexical tokens such as Token::Fn, Token::Let, and left-to-right evaluation groups, reducing allocations to absolute zero.

2. V8 Engine Memory & FFI Alignment

The bytecode generator directly outputs binary arrays compliant with the native WebAssembly specification. Variables are mapped to flat local indices via local.set and local.get, and FFI boundaries are integrated natively using an optimized binary Import Section structure linked to the JavaScript host container.