bft

Crates.iobft
lib.rsbft
version0.2.0
created_at2025-07-05 02:06:05.129541+00
updated_at2025-08-02 19:09:43.475923+00
descriptionA collection of command line tools for executing, analyzing, and visualizing Befunge code.
homepagehttps://github.com/esoterra/befunge-tools
repositoryhttps://github.com/esoterra/befunge-tools
max_upload_size
id1738686
size332,248
Robin Brown (esoterra)

documentation

README

Befunge Tools - bft

A collection of command line tools for executing, analyzing, and visualizing Befunge code.

Befunge

Befunge 93 is an esoteric programming language where

  • programs are 2-dimensional grids of u8 cells, not sequences of lines;
  • the program counter is 2-dimensional and can move up, down, left, or right!
  • instructions are ASCII characters and occupy a single cell in the grid;
  • instructions pop/push from a stack of i32 cells;
  • programs can modify themselves to store data and change program flow.

Befunge Tools currently targets Befunge 93 except that programs may be larger than 80x25. In the future, this may be updated to a new dialect with a Befunge 93 compatibility mode.

Befunge Tools

Befunge Tools is a collection of command line tools for executing, analyzing, and visualizing Befunge code.

  • the run command which is a no-frills Befunge interpreter.
    • (Planned) support use in shebang interpreter directive
  • the debug command which launches an interactive TUI environment.
    • command tab with debugger run/step/pause functionality
    • console tab with interactive virtual terminal
    • (Planned) timeline tab with time-travel debugging
    • program visualization with path-aware highlighting
    • stack visualization sidebar
    • breakpoint support

Run

Execute bft run ./path/to/file.b93 in your terminal.

Runs the program and

  • reads input from standard input,
  • writes output to standard output,
  • logs interpreter errors to standard error,
  • exits with status code 0 unless the interpreter encounters an error.

Debug - TUI Debugger

Execute bft debug ./path/to/file.b93 2> log.txt in your terminal.

(Logging will probably become configurable or automatically placed in files in the future, but for now it is printed to standard error by default for development purposes and redirecting it is recommended/expected)

Launches the interactive debugger Terminal User Interface (TUI) with the specified program loaded in.

A terminal window displaying the Terminal User Interface (TUI) of a debugger for the Befunge esoteric programming language. It is made up of Box Drawing Characters and styled with ANSI color codes. It has a main program area displaying a program for a simple guessing game that picks a random number that you try to guess,, a sidebar with an empty table titled Stack, and a set of tabs at the bottom called Console, Commands, and Timeline.
The interactive debugger UI. Click it to see a demo at asciinema.org!

Logging

The debugger automatically saves logs to ~/.bft/logs. The log level is controlled by the --log-level argument.

Commit count: 0

cargo fmt