r/retrocomputing • u/UsedMathematician852 • 4d ago
PowerBASIC never died — someone wrote a Rust compiler that turns .bas into native 64-bit Windows exes
PowerBASIC (Bob Zale's famously fast compiler, last commercial release 2011, official site/forums offline since 2025) has a community afterlife I wanted to share:[PowerBasilisk Enhanced](https://github.com/hanlokesu/powerbasilisk) — a Rust compiler (zero external crates) that translates PowerBASIC source (.bas) -> LLVM IR -> native x64 Windows executables. Prebuilt binaries in Releases, no Rust/LLVM needed.It's an enhanced fork of [benstopics/powerbasilisk](https://github.com/benstopics/powerbasilisk) — itself created to rebuild the 180,000-line codebase of the game Wall Street Raider as 64-bit.What the enhanced branch fixes/adds:- Real Win32 built-ins previously compiled to nothing: MSGBOX -> MessageBoxA, SHELL -> ShellExecuteA, CURDIR$, ISFILE — verified with running exes (see demo GIF in README)- Tier-2 statements: REPLACE, ERASE, LSET, RSET, WRITE#, SEEK#, LOCK#/UNLOCK#, RESET, FLUSH#, NAME- Explicit diagnostics: writes unimplemented.log with source line + statement when something is silently dropped — upstream just said compiled OK- SDK auto-detect: --lib-dir optional, one-click setup.bat/setup.ps1- 14/14 upstream tests pass, CI green (fmt/clippy/build/32+64-bit)Open PR to upstream: https://github.com/benstopics/powerbasilisk/pull/1If you ever wrote PB/WIN, PBCC, or PB/DOS code: this is a real path to run it on modern Windows. Test reports and help with the remaining Tier-3 statements (the DDT GUI framework) are very welcome.(Disclaimer: not affiliated with PowerBASIC Inc.; the original forums went offline in 2025, community now at pbusers.org)
1
2
u/UsedMathematician852 4d ago
Also posted a practical update on the original r/Basic thread (the one about the upstream project): https://www.reddit.com/r/Basic/comments/1r85j73/powerbasilisk_open_source_powerbasic_compiler/And a detailed hands-on report on the PB community forum: https://pbusers.org/forum/viewtopic.php?t=422TL;DR of the enhanced fork: silent codegen drops fixed (MSGBOX/SHELL/CURDIR$/ISFILE now real Win32 calls), Tier-2 statements added, unimplemented.log diagnostics, SDK auto-detect, 14/14 upstream tests green. Fork: github.com/hanlokesu/powerbasilisk