r/coolgithubprojects • u/kdekorte • 5m ago
OxidizedBASIC 0.1.0: a VB6-style BASIC with a visual form designer, written in Rust (GPUI IDE + Cranelift JIT)
galleryOxidizedBASIC (oxbasic) is a classic BASIC in the VB6/VBA style, written in Rust. It aims at VB6 compatibility, not full parity.
What's in it
- A visual IDE built on GPUI: form designer (drag, resize, toolbox), code editor with syntax colouring, folding, find/replace and diagnostics, a property inspector, and a debugger with breakpoints, step over, step into and a watch pane.
- A runtime for the classic language:
Sub/Function,Select Case,On Error,Type,Enum, arrays, and file I/O (sequential, random and binary). - A form runtime with 20 controls (buttons, lists, a drawing PictureBox, sliders, tabs, a DataGrid and more), menus, and VB's event order.
- A Cranelift JIT for hot loops. A 10-million-pass loop runs in about 0.03 s instead of 1.3 s, and the Mandelbrot example (307,200
PSetcalls) draws in about 0.13 s instead of 5.4 s. It's tested by running each program with the JIT on and off and comparing the output. - It will build macOS .app files so you can distribute your applications independently.
The screenshot in the README is the Mandelbrot example, drawn pixel by pixel in BASIC.
Limits, so you know before you try it
- macOS only so far. GPUI is cross-platform, but I haven't built it for Linux or Windows.
- The app is ad-hoc signed, not notarised, so on another Mac you'll need to right-click and choose Open.
- No
Property Get/Let/Set, class modules or COM objects. - The JIT only covers loops over numbers. Loops that call a
Subor use strings or arrays run in the interpreter.
There's a Homebrew cask and a .pkg planned for releases (see the README). Feedback and bug reports are welcome.
