Skip to main content

Crate ruchy_wasm

Crate ruchy_wasm 

Source
Expand description

WebAssembly bindings for Ruchy

This crate provides WASM bindings for the Ruchy compiler, enabling:

  • Browser-based Ruchy compilation
  • Interactive code playgrounds
  • Educational tools and documentation
  • Real-time syntax validation

§Example

import init, { RuchyCompiler } from './ruchy_wasm.js';

async function compile() {
    await init();
    const compiler = new RuchyCompiler();
    const rustCode = compiler.compile('fn add(a, b) { a + b }');
    console.log(rustCode);
}

Structs§

RuchyCompiler
WebAssembly compiler interface for Ruchy