Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1009 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 1009 Bytes

WebAssembly Compiler Backend

A single-target rush compiler backend which generates Wasm files without the need for external dependencies.

Prerequisites

Since the compiler itself requires no external dependencies, only a WebAssembly runtime is to be installed. Hence, program execution requires a Wasm runtime.

Runtime

On Arch-Linux based systems, the following package can be installed to set up a working Wasm runtime.

  • wasmer for executing .wasm files

Compiling and Running rush Code

Compilation of rush Code

  • Prerequisite: A file ending in .rush which contains the program.
  • Execute following command as it will generate the output.wasm file from the source program.
cargo run your-program.rush

Running Wasm Files

  • Since you have installed a Wasm runtime prior to reading this section, following command can be used to execute the .wasm file using this runtime.
wasmer output.wasm