BasicRS

August 1, 2025 ยท View on GitHub

BasicRS is a Rust implementation of both a BASIC interpreter and a BASIC compiler.

BasicRS is part of the TrekBasic family of BASIC programming tools.

LOGOProjectDescriptionLanguageInterpreterCompiler
LogoTrekBasicBasic compiler and interpreterPythonYesYes
LogoTrekBasicJBasic compiler and interpreterJavaYesYes
LogoBasicRSBasic compiler and interpreterRustYesYes
LogoBasicTestSuiteA test suite for BasicBASIC--
LogoTrekBotA tool to exercise the superstartrek programRust--

All versions, interpreted and compiled, are intended to by byte-by-byte compatible, but are not there yet - but they are close. TrekBot and BasicTestSuite are part of the plan to ensure full compatibility.

My goal was to be able to play the old Star Trek game, which was written in BASIC.

https://en.wikipedia.org/wiki/Star_Trek_(1971_video_game). 

I have achieved that goal.

To Run

cargo run -- superstartrek.bas

OR

target/debug/basic_rs superstartrek.bas

Shell

If you want to use the shell for BASIC which is the command line "IDE" - sort of.

It provides breakpoints, single stepping, code coverage, and more.

./target/debug/basic_shell superstartrek.bas

or just

./target/debug/basic_shell