Hasty Briefsbeta

WAForth – Forth interpreter and compiler for WebAssembly

19 hours ago
  • #Forth
  • #Compiler
  • #WebAssembly
  • WAForth is a Forth interpreter and compiler for WebAssembly, entirely written in raw WebAssembly.
  • It supports ANS Core Words and many ANS Core Extension Words, passing the Forth 200x Test Suite.
  • WAForth can be used in web environments (browsers, Node.js) and has a standalone native command-line shell.
  • It includes tools like 'waforthc' for ahead-of-time compilation of Forth programs into native executables.
  • WAForth allows embedding in JavaScript applications, with examples provided for binding JavaScript functions.
  • Experimental support for directly writing WebAssembly in Forth using the CODE word is available.
  • A Visual Studio Code Extension for WAForth enables interactive Forth notebooks with executable code.
  • Goals include WebAssembly-first implementation, simplicity, completeness, and reasonable speed and binary size.
  • The build process uses the WebAssembly Binary Toolkit and Node.JS, with commands for building and testing.