Forthling

•

Execute standard Forth-2012 code in a safe, sandboxed stack-machine environment across terminals, browsers, Python, and AI agent workflows.

Forthling is a lean, dependency-free Forth-2012 system written in Rust with complete standard compliance from CORE to FLOATING word sets. Built for deterministic and secure execution, it features a strictly bounded sandbox with in-memory virtual files and runtime step limits that prevent runaway execution and unwanted disk access. Forthling seamlessly integrates into modern development workflows through a terminal CLI, WebAssembly browser playground, Python bindings, and a native Model Context Protocol (MCP) server that provides AI agents with persistent Forth sessions and detailed stack-trace feedback for rapid debugging.

主な機能

010 GitHub stars
02MCP server interface offering stateful Forth sessions and real-time stack introspection for AI agents
03Secure sandbox enforcing execution step, time, and memory limits with an in-memory virtual file system
04Versatile hosting support across CLI, embedded Rust, Python bindings, and WebAssembly in the browser
05Full Forth-2012 standard compliance passing official CORE through FLOATING test suites
06Zero-dependency, safe-Rust core ensuring bounded memory usage and predictable cross-platform behavior

ユースケース

01Learning and testing concatenative programming through interactive built-in tutorials and recipes
02Equipping AI agents with a sandboxed, deterministic stack-based execution environment via MCP
03Embedding a lightweight, safe Forth scripting interpreter into Rust or Python applications