How carlosrabelo/pforth works
PForth is a deterministic 16-bit Forth interpreter/compiler implemented in C++, Go, Pascal, and Rust, with shared Forth libraries and demo programs. The user workflow is to launch a port, provide Forth source files or interactive input, and have that port’s runtime interpret or compile and execute the words, producing console output. The sampled C++, Go, and Rust sources show their CLI-to-runtime flow; Pascal and the shared Forth assets are documented in the README but their runtime wiring was not sampled.
Main entry points: cli.cpp C++ CLI · main.go Go CLI · main.rs Rust CLI · forth.cpp C++ Engine
Components 11
Command Interfaces
Forth Runtimes
- C++ Engine
cpp/pforth/src/forth.cpp - Go Engine
go/pforth/internal/forth/forth.go - Rust Engine
rust/pforth/src/forth.rs - Pascal Port
pascal/pforth/src
Forth Programs
- Shared Libraries
pforth - Demo Programs
demos
Other components
- User
- Console I/O
Connections 11
- User → C++ CLI: invokes
README.md - User → Go CLI: invokes
README.md - User → Rust CLI: invokes
README.md - User → Pascal Port: uses
README.md - C++ CLI → C++ Engine: loads files; starts REPL
cpp/pforth/src/cli.cpp - C++ Engine → Console I/O: reads and writes
cpp/pforth/src/forth.cpp - Go CLI → Go Engine: initializes; loads; runs
go/pforth/cmd/pforth/main.go - Go Engine → Console I/O: reads and writes
go/pforth/internal/forth/forth.go - Rust CLI → Rust Engine: parses; runs
rust/pforth/src/main.rs - Rust Engine → Console I/O: reads and writes
- Pascal Port → Console I/O: interacts