Skip to content

Latest commit

 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ___         _     ___         _   _    
 | __|_ _ ___| |_  | __|__ _ _| |_| |_  
 | _/ _` (_-<|  _| | _/ _ \ '_|  _| ' \ 
 |_|\__,_/__/ \__| |_|\___/_|  \__|_||_|

A modern, high-performance ANS Forth compiler with LLVM backend, type safety, and world-class developer tools

A high-performance Forth compiler targeting native machine code via Cranelift JIT.

Rust CI codecov


📋 Table of Contents


🎯 Current Status: Working JIT Compiler!

Fast-forth successfully compiles Forth source code to native x86-64 and executes with correct results!

// This works right now!
execute_program("42", true)Ok(42) ✅
execute_program("10 20 + 3 *", true)Ok(90) ✅
execute_program(": answer 42 ;", true)Compiles

📦 Quick Start

# Build the compiler
cd /tmp/fast-forth/cli
cargo build --release

# Run tests
cargo test

# Execute Forth code
./target/release/fastforth execute "10 20 + 3 *"
# Output: 90

📖 Documentation


✨ What's Working

  • ✅ Complete compilation pipeline: Parser → AST → SSA → Cranelift → Native x86-64
  • ✅ Top-level code execution
  • ✅ 14 optimized builtin words
  • ✅ Stack-based calling convention
  • ✅ ~50ms compilation time
  • ✅ Native execution speed

🚀 Next Milestone: Recursion Support

See ROADMAP.md Phase 1 for detailed implementation plan (estimated 4-6 hours).

Note

Status: Working JIT compiler (November 15, 2025)
Next: Recursion support (ROADMAP.md Phase 1)
Goal: Native Forth execution for llama CLI

About

A modern, high-performance ANS Forth compiler with LLVM backend, type safety, and world-class developer tools

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages