powerbasilisk - another PB-Code to C-Converter

Started by Theo Gottwald, June 20, 2026, 08:19:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

PowerBasilisk is an open-source attempt to build a modern 64-bit PowerBASIC-compatible compiler in Rust. It translates PowerBASIC 9.x-style source code into LLVM IR and then uses Clang/LLVM to produce native binaries.

Its main strengths are its clean architecture, Rust implementation, LLVM backend, and separate AST-based interpreter for testing. It is especially interesting as a reference project for compiler developers.

Its main weakness is that it is not the original PowerBASIC source code and not yet a full PowerBASIC replacement. It appears to support only a subset of the language, and advanced PowerBASIC features such as dynamic arrays, exact string semantics, COM/WSTRING behavior, callbacks, inline assembler, and full PB/WIN compatibility would need careful verification.

MASTER, gefunden: PowerBasilisk.

GitHub: benstopics/powerbasilisk
Es ist ein Open-Source PowerBASIC-Compiler in Rust, der PowerBASIC 9.x Quellcode nach LLVM IR kompiliert und dann über clang native EXE/DLL/OBJ erzeugt.

Wichtigste Punkte:

Repo: https://github.com/benstopics/powerbasilisk

Sprache: Rust, plus kleiner C-Runtime-Anteil.
Lizenz: Apache-2.0.
Ziel: PowerBASIC 9.x kompatibel.
Binaries: Windows, macOS, Linux verfügbar laut README.
Build:
git clone https://github.com/benstopics/powerbasilisk.git
cd powerbasilisk
cargo build --release


In short: PowerBasilisk is technically interesting and worth studying, but it should be treated as an early reimplementation, not as a mature drop-in replacement for PowerBASIC.

Powerbasilisk.png