twinBASIC Update: September 29, 2026
Highlights include the long-awaited release of LLVM support--resulting in faster performance and smaller file sizes of compiled twinBASIC applications.
On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference. I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025. (And I was oh so close...) With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.
Every Sunday Monday week, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project. If you come across items that should be included here, please leave a comment below.
Here are some links to get involved with the project:
- Custom twinBASIC IDE Installation Guide
- twinBASIC Discord Server (chat about the project)
- twinBASIC Documentation (list of new features not in VBx)
- GitHub Issue Tracker (report bugs)
Highlights
LLVM Is Here!!!!
Check out the new documentation page for details:

The short version is that LLVM allows the twinBASIC compiler to apply optimizations to your existing code to boost its performance and/or reduce the file size of the compiled binaries.
Those two objectives are not mutually exclusive.
Here's an excerpt from the above wiki page:
Enable LLVM Compilation turns LLVM on. With only this box ticked, LLVM runs during compilation and creates the intermediate representation of your code, but does not apply the optimizations for performance and size. You will usually want to tick one or both of the next two options as well: LLVM: Generate optimized code and LLVM: Optimize for smaller filesize. Generate optimized code is for optimizing for speed. This is not mutually exclusive with Optimize for smaller filesize, and when both are enabled, LLVM determines if an optimization doesn’t provide a significant enough benefit to be worth the size increase.
Discord Chat Summary
* Auto-generated via Claude Sonnet 4.6
Overview
The week centered on the twinBASIC BETA 984 release, which brought LLVM optimization support. Wayne called it the biggest lift remaining before v1.0. Discussion covered early LLVM benchmarks, string-function performance, and new ThisCall/FastCall support for interface members. It also covered Wayne's AI code auditor, which set off a lively naming contest. Engagement was high, with many long technical threads.
Release & LLVM Support
- waynephillipsea announced BETA 984 (beta) with LLVM support and pointed users to the LLVM "Getting Started" docs. The launch got a very enthusiastic reception.
- Asked whether anything this large remains, waynephillipsea said there is important work left but "nothing on that scale" for v1.
- LLVM is enabled per project under Project Settings → compiler options. The Personal edition compiles only the built-in packages (e.g. VB forms) with LLVM, while user code is optimized only in Professional and Ultimate.
- The release executables are unsigned, so expect antivirus false positives. waynephillipsea said the code-signing certificate expired. The plan is to move to an EV certificate, which will likely take a few weeks.
- waynephillipsea is now on holiday for a few weeks.
Performance & Benchmarks
- A string-sort test showed tB slower than VB6 (VB6: 2.08s; tB 32-bit: 4.20s; unoptimized: 4.40s). LLVM helped only slightly, and unchecking "optimize size" saved about 20KB with no speed change.
- waynephillipsea said
StrCompcurrently usesVarBstrCmpand will be investigated, and that tB will beat VB6 here. VB6 internals can't be disassembled because tB uses clean-room re-implementations. Split()andReplace()are already much faster in tB than in VB6.InStrmeasured roughly 25% faster.- LLVM thread count defaults to 1. waynephillipsea won't raise it yet because some procedures use nearly 2GB of RAM each to compile. He matches the thread count to his CPU core count.
- A persistent compile cache is planned. waynephillipsea favors a machine-wide cache so built-in packages compile once for all projects.
Language & Compiler Enhancements
- After fafalone found that windowless RichEdit's
ITextHostuses__thiscall, waynephillipsea addedThisCallandFastCallon interface member definitions (as withCDecl). This is new and tested in debug and LLVM builds. DispCallFunc'sCALLCONVenum has no__thiscallequivalent. waynephillipsea's workaround isFastCallwith a padding second argument to filledx.- For interface methods that are really
void, declaring them as returningHRESULTis fine because the return value is ignored at the call site.PreserveSigcannot yet be combined withImplements. - deletedewd reported a generic-types bug (still open):
CType(Of UDTWrap(Of Integer))(...)works whenUDTWrapis in the project but fails when it comes from a package.Dim i As Long = 65536 Debug.Print CType(Of UDTWrap(Of Integer))(VarPtr(i) + 2).Value - fafalone noted
.twinpackpackages are currently uncompiled and so are neither 32-bit nor 64-bit. Compiled packages are expected in the future.
IDE, Stability & AI Auditing
- alaskandruid reported that 64-bit mode crashes the compiler in beta 987 and is staying on 983 for now. fafalone sees a crash only after an hour or so of use.
- deletedewd hit an IDE lock-up in Find/Replace (WebView2 at high CPU). He also saw a stuck "SHIFT KEY DETECTED: DISABLED LOADING OF ADDINS" message that cleared after he pressed Shift manually. waynephillipsea asked that such issues be reported in #bugs.
- waynephillipsea's AI auditor has access to bug reports from both Discord and GitHub. It is currently working through the compiler sources, and the IDE sources will follow. The auditor is described as audit-only, not a coder.
- For a similar setup, deletedewd suggested giving Claude a folder of exported project sources.
Community Projects & Examples
- fafalone used Claude to build a windowless RichEdit control that renders through Direct2D, giving color-font support without relying on undocumented Office classes. The design uses a lightweight COM
ITextHostobject, and fafalone plans to turn it into a full control project. It also supports the TOM interfaces, which WinDevLib covers extensively. - deletedewd shared a generic
cEventsSinkclass for WinRT that usesIUnsupportedInterface. It lets one class receive events from any control without implementing each handler interface:Control.AddClick New cEventsSink(Me, Event_Click, GetDeclaredTypeIid(Of IRoutedEventHandler)) - deletedewd also showed WinRT
RichEditBoxexperiments. He pitched WinRT as an alternative to Win32 RichEdit, while fafalone and others noted its tradeoffs, including Windows-only reach and a learning curve.
Community Discussion & Roadmap
- The community held a naming contest for the AI auditor. Suggestions included Audrey, twinSpector-AI, and TwinSight. waynephillipsea liked that TwinSight fits with TWINBASIC and TWINSERV.
- Many members voiced interest in Linux, macOS, ARM, and Android targets. They also asked for cross-compilation from Windows, and one user reported that tB executables don't run on Steam Deck via Proton.
- Some users are planning their Windows 10/11 exits and hoping v1.0 arrives soon. One joked about reaching v1.0 at beta 1000, with betas up to 991 mentioned.
Conclusion
BETA 984 delivered LLVM support, the largest remaining piece before v1.0. Follow-up work is already lined up: StrComp optimization, LLVM memory and threading tuning, a persistent compile cache, generic-type fixes, and the IDE-stability bug reports. The new ThisCall/FastCall support shows how quickly community needs (such as fafalone's windowless RichEdit work) feed into language changes. With waynephillipsea away for a few weeks and a new signing certificate pending, the community is keeping busy with benchmarks, bug reports, WinRT experiments, and cross-platform speculation.
Around the Web
tB Now 2x Faster than VB6 in String Sort Challenge
Following the LLVM release, VanGoghGaming ran a fresh comparison of the string-sort challenge as discussed at VBForums. The results speak for themselves:
Well the LLVM optimization finally arrived in twinBASIC and the results are in, the tB version is now twice as fast as VB6
Benchmark source code available at VBForums.
Changelog
Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC Releases page.
AI-Generated Changelog Summary
* Auto-generated via Claude Sonnet 5.5, sorted in order of its opinion of "most impactful changes."
- LLVM compiler (new, optional): Project Settings and IDE Options now include LLVM settings. LLVM can produce faster, smaller code. Turn it on for a whole project, or per procedure with the
CompilerOptionsattribute. It's off by default and isn't available in the free Community Edition. The IDE can't debug LLVM-compiled code. Fixes in this release coverEnd, array locking,Sanitize Booleansand a 65,535-relocation limit. - Broader calling convention support:
__thiscalland__fastcallnow work in interface definitions. Support also covers implementations, callbacks, delegates and DLLs. - Closer VB6 behavior:
Line Inputnow reports an error at end-of-file.Circle,LineandPSetfollow VB6's relaxed color rules.ReDimworks on a Variant holding a non-array value.Collection.NewEnummatches VB6's layout.#Constcan shadow built-in compilation arguments as in VB6.- Integer division now raises an overflow error for
min \ -1. Len/LenBnow evaluate their expressions.
- Breaking changes:
DataObject.AvailableFormats.Item(index)andErrEx.Callstack.Item(index)now use 1-based indexes, like other built-in collections. Existing code that uses these may need updating. - Stability and memory:
- Opening large projects uses less RAM.
- Several string, handle and GDI leaks are fixed.
- Collection and
DataObject.Fileshandling is hardened. - Several regressions are fixed:
WithEventscrashes, the Printers collection, Project Explorer crashes and garbled text, and inaccessible[MustBeQualified]modules that affected theAsserttest library.
- Control and IDE fixes: The TextBox
Changeevent no longer fires twice when the text is set in code. A trailing space on thetwinBASIC.execommand line no longer causes a "Bad command line syntax" error. Other fixes cover the SliderOrientationConstantsenum,ListBoxitems disappearing at design time,Protectedauto-complete, and the Clear All Breakpoints command not marking the project as changed. - Localization: The Polish language pack is updated.
WARNING: The following issues are present in each of the releases below:
- NOTE: THE EXECUTABLES IN THIS PARTICULAR RELEASE ARE UNSIGNED. EXPECT FALSE-POSITIVE DETECTIONS FROM ANTI-VIRUS SOFTWARE.
- IMPORTANT: This is a BETA release under active development. It is not recommended for production use.
BETA 984
- fixed: (regression) inline ByVal attribute on UDT arg to a ByRef As Any param not preserving wide strings for Vbx compatibility in recent TB builds
- improved: reduced RAM footprint when opening large projects
- fixed: debug-codegen issue on Win64 with ArrayBoundsChecks OFF and negative array indices [ fafalone, discord ]
- fixed: attributes ArrayBoundsChecks/IntegerOverflowChecks/FloatingPointErrorChecks can now be used to toggle the features back ON when OFF at the project level [ fafalone, discord ]
- fixed: minor BSTR leak when an error value is converted to a string, e.g CStr(CVErr(213))
- fixed: Line Input statement not reporting an error on EOF [ https://github.com/twinbasic/twinbasic/issues/2363 ]
- fixed: various compiler/ide/runtime unreported bug fixes and general edge case hardening
- fixed: inconsistent behaviour of right shift operator on signed types (folded vs unfolded)
- fixed: export section of built DLL name is no longer 'test.dll', instead populated with the build file name
- fixed: GDI pen handle leak in drawing Graphical style buttons
- fixed: double firing of TextBox Change event when TextBox Text value is changed programmatically [ https://github.com/twinbasic/twinbasic/issues/2405 ]
- fixed: potential edge case handle leaks in LoadResPicture()
- fixed: some implicit class field String/Variant property-let accessors were leaking BSTRs/Variants
- fixed: BREAKING CHANGE: DataObject.AvailableFormats.Item(index) is now a 1-based lookup to match most other built-in collection accessors
- fixed: BREAKING CHANGE: ErrEx.Callstack.Item(index) is now a 1-based lookup to match most other built-in collection accessors
- fixed: Circle/Line/PSet color value handling to match VB6's relaxed rules
- fixed: Len(expr) and LenB(expr) would previously give the datatype length without evaluating the expression for some datatypes (side effects would be lost)
- fixed: some LSet/RSet statement edge cases
- fixed: integer-divisions () were not throwing an error for the min-1 negate overflow cases
- fixed: StrConv(, vbUpper/vbLowercase) was not working properly for some locales
- fixed: FileSystem.FileCopy function would previously allow copying of an already open file without error
- fixed: Collection.NewEnum vtable position to match VB6 [ VanGoghGaming, discord ]
- improved: Hardened DataObject.Files (CF_HDROP) handling against edge cases and bad third-party originating source data
- fixed: shadowing of built-in conditional compilation arguments (e.g.
#Const Win32 = 0) now matches VB6 behaviours - improved: some edge case hardening in the Collection implementation
- added: IDE option
LLVM Compiler: Maximum number of threads(default: 1) - added: IDE option
LLVM Compiler: Complex procedure reporting threshold (milliseconds)(default: 10,000) - added: IDE option
LLVM Compiler: Keep cache process alive after exiting the IDE(default: TRUE) - added: project option
Compiler Options (BUILD)-> you must currently edit this to enable LLVM builds on your project - added: project option
Compiler Options (DEBUG) - fixed: some InStr/InStrRev edge cases
- fixed: IDE: Clear All Breakpoints method did not set the project state to dirty [ Tom van Stiphout, discord ]
- fixed: Slider OrientationConstants enum was not accessible [ movx, discord ]
- fixed: auto block-complete for entering
Protectedmembers was not working [ fafalone, discord ] - fixed: ReDim on a variant that contains a non-array value is now supported, to match VB6 [ VanGoghGaming, discord ]
- fixed: Err.Description can give an invalid string from the result of error propagation [ wqweto, discord ]
- updated: 1 language pack (Polish)
- special thanks to our community members for the new/updated language packs (Michał)
- SEE: https://docs.twinbasic.com/LLVM/Getting-Started "Getting Started with LLVM"
BETA 985
- fixed: (regression) some statements involving WithEvents members could cause a hard crash [ CoachJA, discord ]
- fixed: (regression) packaged modules using [MustBeQualified] attribute were not accessible, affecting unit Test library
Assert[ FullValueRider, discord ] - fixed: (regression) displaying intellisense on special internally redirected members (
[RedirectToStaticImplementation()]) can trigger a compiler restart - fixed:
Endstatement not effective in LLVM compiled projects [ logley, discord ] - fixed: twinbasic.exe command line parser whitespace bug [#2426]
BETA 986
- fixed: (LLVM) some array accessors were missing SafeArrayUnlock or equivalent [ VanGoghGaming, discord ]
- fixed: (regression) Len/LenB failing on class members when evaluating constant expressions such as array bounds [ axisdj, discord ]
BETA 987
- fixed: (LLVM) further refinement of SafeArrayLock/Unlock semantics
BETA 988
- fixed: potential crash on editing of Alias types [ fafalone, discord ]
- fixed: LLVM compiler support was being limited to 65535 relocations per unit [ Gary Miller, discord ]
- fixed: (regression) garbled characters in the PROJECT EXPLORER when in object-view mode [ wayaya30, discord ]
- fixed: (regression) PROJECT EXPLORER in object-view mode could cause a crash
- fixed:
Sanitize Booleansproject option was not supported by our LLVM compiler [ Jim Mack, discord ]
BETA 989
- fixed: RaiseEvent edge case [ birnaofthenorth, discord ]
- fixed: (regression since BETA 984) Printers collection not working [ birnaofthenorth, discord ]
- fixed: changing certain properties such as ListBox.IntegralHeight would cause erasure of the ListBox List elements at design time [ fafalone, discord ]
BETA 990
- added: initial support for __thiscall and __fastcall in interface definitions [ fafalone, discord ]
BETA 991
- fixed: (regression since BETA 984) compiler startup thread race crash [ Alaskan Druid, discord ]
BETA 992
- added: more comprehensive support for ThisCall and FastCall calling conventions (implementations, callbacks, delegates, DLLs)
- fixed: compiler crash reported [ ArtA, discord ]
