About the project
Implementation status and verification
This page summarizes what is and is not implemented compared with the language specification, and what has been verified in which environment. Planned features and their priorities are in the ROADMAP.
Commands
| Command | Status |
|---|---|
init / check / build / build --target js / watch / pack / unpack / fmt / lsp --stdio |
Implemented |
form new / form check / form pull |
Implemented |
sync |
Implemented (Windows only. Applies modules and user forms to a workbook open in Excel. --pull is not implemented) |
setup / typegen / pack --via-excel |
Not implemented (running them prints a message saying so and exits) |
run / book dump / book diff / book view / book edit / book samples / book new |
Implemented (spec §14.13, §14.14) |
explain / cheatsheet / doc |
Implemented (spec §14.15) |
test |
Implemented (spec §14.12. --excel is Windows only) |
excel run / excel compile / excel compare |
Implemented (spec §14.17. Windows only) |
Implementation status of the specification
The current state against the specification (Draft v0.7).
| Spec | Status | Notes |
|---|---|---|
| §2 Types, numeric literals, type conversion | Implemented | The error for using long outside #If Win64 is not implemented (only conditional emission of declarations) |
| §2.4 Generics | Implemented | Functions, extension methods and classes. Generic methods inside classes are not supported (error). Default type arguments (T = type) are for classes and interfaces only |
| §2.6 Union types, type narrowing | Implemented | Narrowing by instanceof / typeof applies only to local variables and arguments (not fields or module variables). Union type inference (for example when the two sides of a conditional operator have different types) is not performed. In the bundled type definitions, activeSheet, sheet collections, Worksheet.next, the various parents, getOpenFilename and others are made union types (§2.6.5) |
§3 Functions, byref, extension methods, named arguments |
Implemented | Named arguments (f(a: 123, c: "abc")) are reordered to the declaration order in the output. They cannot be used with lambdas or late-bound calls |
| §4 Lambdas (loop fusion, closure classes) | Implemented | map / filter / forEach / reduce / some / every / find / findIndex. The same methods and toArray() also work on host collections (worksheets, etc., §4.4). Array and string methods are implemented as compiler built-ins, not as the "standard library extension methods" of spec §3.2.4 |
§5 try / catch / finally / using / throw |
Implemented | The catch body runs at a label after Resume, not inside the handler (so that a rethrow reaches an outer try in the same procedure) |
| §6 Linter | Partial | Rules 1–6, 8–10, 14 and 15 are implemented. Rule 7 (renaming reserved words) only renames automatically, with no warning; rule 11 only converts, with no notice |
| §7 CLI and VS Code extension | Partial | As in the table above |
| §8 Inlining and loop optimization | Partial | inline, automatic expansion in loops, preservation of evaluation order, conversion to For...Next, and $ functions are implemented. Hoisting of loop invariants (other than the upper-bound expression), With conversion and string buffers are not implemented |
| §9 Bulk Range ⇔ array transfer | Implemented | The "read the existing contents, then write back" mode of @bulk is not implemented (loops that do not satisfy condition 5 are not converted) |
§10 Application state, automatic DoEvents insertion |
Implemented | |
§11 declare (32/64-bit) |
Partial | Alignment calculation for declare struct and @fallback are not implemented |
§12 Boilerplate, events, @init, macro entry points |
Partial | Files for sheets and ThisWorkbook (objects/, §12.1.1, §12.2) are implemented. ActiveX controls on sheets (§12.2.1) and WithEvents (@on("<variable>.<event>"), §12.2.2) are also implemented (in debug runs and tests without Excel, handlers are also called when the variable points to the project's workbook, sheet or Application). Event handlers attached at run time (on / addEventListener, §12.2.3) are also implemented (the generated VBA has been verified on real Excel 2021 for attaching and detaching to sheets, workbooks, Application, shape OnAction and form controls, and for cancelling BeforeClose). The ribbon (@ribbon, §12.5) is not implemented |
| §13 Avoiding VBA pitfalls | Partial | The Collection wrapper, the Range.Find wrapper, existence checks for names given as strings, and reuse of temporary variables are not implemented |
| §14.1–14.8 Live sync | Partial | Applies to a workbook open in Excel on every save (ras sync, ras watch, the VS Code language server. Windows only). ras rewrites the VBE code modules directly through COM; shared memory and RASBridge.xlam (§14.2, §14.4, §14.5) are not used. Of the application rules (§14.6), diff application, rewriting whole document modules, Import of classes with attributes, rollback on failure, and deferral while running or in break mode, as well as drift detection (§14.7), are implemented. Converting hand-written standard modules, sheet / ThisWorkbook code and forms in the workbook to RAS and importing them, moving them under RAS management (§14.7.1), is implemented. Importing procedures and declarations added in the VBE to a RAS-generated module into the RAS files (§14.7.3; the written code is saved in build/sync/ for comparison) and duplicating the source file for a sheet duplicated in Excel (§14.7.2) are also implemented. A compile check after applying (sync.compileCheck), the Excel → local direction (--pull, two-way sync of unmanaged modules), importing class modules, changing attributes of existing classes, and ras setup are not implemented |
| §14.9 Offline write and read | Implemented | Re-signing is not implemented. Writing unmanaged modules in vba/ back to the workbook is not implemented (extraction only. User forms are handled in forms/) |
| §14.10 Debug run (JavaScript runtime) | Implemented | User forms (§14.10.7) are shown in a VS Code panel. Key, mouse and drag events and ControlSource are not supported. The connection to Excel (ras_com.node) has been verified on real Excel 2021 (64-bit). Dialog monitoring (§14.10.6) has been verified against message boxes in CI on Windows without Excel, and on real Excel 2021 with run-time errors, compile errors, MsgBox, the confirmation for deleting a sheet, and "Yes / No" prompts that need a choice. CI verifies COM calls on Windows without Excel using Scripting.Dictionary and others. The Excel stand-in for environments without Excel (§14.10.8, ras_book.node) is verified by automated tests (Linux / Windows) that run RAS programs on Node and check cells, formulas and saved results, and also in VS Code (answers in launch.json, sheet preview while paused, forms). Comparison with Excel is done with tools/standin-check (see "Verification status" below). Inserting and deleting cells, cut / copy / paste, sorting and filtering, saving formatting, manual calculation, and workbook and sheet events are also verified by the same automated tests, and the event order, the operations that clear a copy, and the formatting when a saved workbook is opened in Excel were matched against real Excel. The position and size of shapes (Shape.Left / Top / Width / Height / TopLeftCell / BottomRightCell and Range.Left and the like, computed from row heights and column widths) and notes (Range.AddComment / Comment / Worksheet.Comments, written into the saved workbook and shown by ras book view / dump) are checked by the automated tests too, but have not yet been compared with real Excel. Inheritance with super calls is out of scope |
§14.11 User forms (forms/) |
Implemented | Generation from FormSpec (including Image pictures and ComboBox / ListBox items), extraction from a workbook (ras form pull), live sync, and running in Excel (§14.11.8). Generating custom ActiveX controls and detecting edits in the VBE (drift) are not implemented |
§14.12 Tests (ras test) |
Partial | Listing tests (--list), running, expect, hooks, workbook rollback, useWorkbook / tempDir / printed, replacement (mock*), timeouts, --reporter pretty / json / junit, -t, --ci, --bail, --watch, --inspect-brk, saving the workbook of a failed test, the [test] settings, snapshots (toMatchSnapshot, -u), running in real Excel (--excel, [test] excel = "com"; Windows only), and editor integration (§14.12.10: running, debugging and showing the results in VS Code's test explorer, type checking and completion for test files in the language server) are implemented. --excel is slow because the test's JavaScript drives Excel over COM; converting tests to VBA and running them inside Excel is not done (ROADMAP item 16). On the Excel stand-in, test files run in parallel (one at a time with --sequence or --excel). Tests not selected by -t do not appear in the results. In the Excel stand-in, toBeEmpty and toBeNothing both pass for either Empty or Nothing (because the runtime does not distinguish them). The type of expect checks only the expected value of toBe |
§14.13 Running from the CLI (ras run) |
Implemented | Runs only on the Excel stand-in (to run against real Excel, use ras excel run (§14.17, Windows only) or VS Code's debug run). Showing a user form is an error. Calling functions with parameters and @udf functions (--arg) and running @on handlers by what the user does (--event; simulate in tests) are implemented |
§14.16 Adding, duplicating, deleting and renaming sheets (ras sheet) |
Partial | Operations that rewrite the workbook file directly (.xlsx / .xlsm; .xlsb is not possible) and the VS Code commands are implemented. Operations on a workbook open in Excel have also been verified on real Excel 2021 (adding, duplicating, deleting, renaming, refusing a delete, refusal while a macro is running, and the language server commands) |
§14.14 Viewing, comparing and editing workbook contents (ras book dump / diff / view / edit) |
Implemented | Insertions and deletions of rows / columns are inferred at several places too. The formats of dump / diff (--styles) are only font, fill and borders; alignment, protection and the formats of whole rows and columns are not handled. view draws only color scales and data bars among conditional formats, and does not draw table styles or diagonal borders. Column widths are calculated by treating the default font as a Japanese font (11pt) |
| §14.15 Machine-readable diagnostics, error explanations, warnings for APIs unavailable in the stand-in | Partial | --message-format json, ras explain (all codes) and ras check --target stand-in (W0510–W0514) are implemented. The "related locations" of diagnostics (related) give the first declaration of a name declared twice (E0101). The results of user form checks are output as JSON too. ras doc (looking up the API from the CLI, and the list of stand-in support --stand-in) and showing whether the stand-in has a member in the language server's quick info are implemented |
§14.17 Running, compiling and comparing in Excel (ras excel) |
Implemented | Windows only. Writes the project into a copy of the workbook and, in an Excel it starts, runs a function, compiles the VBA, or compares the results with the original macro |
§15 Project layout, ras.toml, bundled type definitions |
Partial | Type definitions for Excel / VBA / Office are bundled, and members and globals are referenced in camelCase (§15.3.1). Type definitions for Scripting (FileSystemObject, Dictionary) and VBScript.RegExp are also bundled, and emitted to VBA with late binding (§15.3). ras typegen and vba: imports are not implemented |
| §16.1 JSDoc | Implemented | Emitting comments and VB_Description to the generated VBA, and checking @param names |
| §16.2 IntelliSense (LSP) | Partial | Diagnostics, completion (including argument names for named arguments, and unimported candidates with automatic import insertion), hover, parameter info, go to definition, go to type definition, find references, highlighting, rename, symbol lists (file and workspace), inlay hints, semantic tokens, folding, formatting, CodeLens (optimization notices, and "Run in Excel" / "Debug run" per function), "Show generated VBA", and quick fixes (fixing names written in VBA spelling, adding an import for an unimported name) are implemented. completionItem/resolve (lazy loading of JSDoc), range formatting, other code actions (turning a literal passed to a byref argument into a temporary variable, adding as to a narrowing conversion), and warnings at @deprecated usages are not implemented |
| §17 Adopted libraries | Partial | salsa (incremental computation; currently everything is reparsed on every change), line-index, annotate-snippets, rayon, insta, lsp-types and windows are not used |
Differences from the specification's examples
- The decimal literal
1.5memits(CDec("15") / CDec("10"))instead ofCDec("1.5")(so that the value does not change in locales where the decimal separator is a comma). Mainin script form (top-level statements) is also wrapped with the macro entry point of §12.4.
Verification status
- Automated tests:
cargo test --workspace(syntax, type checking, matching the specification's code examples against the generated VBA, end-to-end CLI flows, LSP sessions, reading and writingvbaProject.bin). - For the
ras book viewpage, automated tests check the data that rendering is based on (cell display, formulas, formatting CSS, merged cells, the list of changes, and the HTML and positions of shapes and controls). The appearance (a grid that continues as you scroll; shapes, pictures, controls and WordArt) and cell selection and navigation from the list of changes were checked by hand in Chromium (Playwright). The test workbooks that contain shapes were built to imitate the form Excel saves. Workbooks with form controls and ActiveX controls saved by Excel were checked side by side with the Excel 2021 screen. Workbooks saved by Excel 2021 with SmartArt and with embedded objects (files) shown as icons were also checked side by side with the Excel screen (the command and the playground; for workbooks where an embedded object's picture cannot be drawn, the file icon and name are drawn). Charts were checked visually with xljs's test workbooks (12 kinds), and EMF with an EMF made by Office (the icon of a python-pptx embedded object). The VS Code panel ("Show workbook", the display while paused in debugging, and changes since the previous stop) andanswersinlaunch.jsonwere checked on real VS Code (Windows). The part where the runtime writes out the workbook while paused ($rasBookSnapshot) is checked by automated tests. Cell formatting was checked by saving workbooks made in Excel 2021 (Windows, Japanese edition) and comparing side by side with the Excel screen (column width, row height, font, fill and shading, borders, alignment, rotation and shrink-to-fit, wrapping, merged cells, hidden rows and columns, number formats and[Red], display of numbers that do not fit in the column, and conditional-format color scales and data bars). The Japanese edition's built-in number formats (5–8, 23–26, 30–35, 37–44, 52–53, 55–56, 59–81) were read from Excel. ras book editis checked by automated tests (crates/ras-workbook/src/patch/tests.rs) that edit workbooks made with XlsxWriter (formulas, formulas that call VBA functions, merged cells, conditional formats, data validation, filters, notes, buttons, hyperlinks, defined names, charts, tables, a VBA project), verifying the parts that were rewritten and those that were not; that the rewritten workbooks can be read by openpyxl was confirmed by hand. Workbooks saved by Excel (including SmartArt and embedded objects) were edited, and the rewritten workbooks were opened in Excel 2021 to confirm that they open without repair and that values, formulas and shapes remain. Editing in the grid was checked by driving the page in Chromium (Playwright) connected toras book edit(entering values, recalculation, inserting rows, undo, copy and paste, error display; the ribbon's formatting, number formats, fill handle, dragging column widths, sorting, filtering, merging, conditional formats and data validation). Editing in the VS Code panel (key handling, formulas, clipboard exchange with other apps, IME, undo) was checked on real VS Code (Windows). Inserting, moving, resizing, editing text in and deleting shapes and pictures, and fill, line, rotation, flip and z-order; and inserting, moving and deleting form controls and changing their text and settings; and moving, deleting and changing properties of ActiveX controls: automated tests check the parts that were rewritten, and Chromium (Playwright) was used to check sheet preview operations (the shape menu, drawing by dragging, moving, handles, Delete, picture files and pasting, 150% zoom, the shape format tab, the rotation handle, Alt+→, resizing a rotated shape, the right-click z-order menu, the Developer "Insert", dragging controls and Delete, and the control format settings), and the rewritten workbooks were opened in LibreOffice and openpyxl to confirm that shapes, pictures and controls are drawn (Excel 2010-and-later style controls and ActiveX controls were checked with workbooks built to imitate Excel's saved form. The ActiveX controls in those workbooks are not drawn by LibreOffice, so ActiveX is checked only by automated tests and by loading with openpyxl). The rewritten workbooks were opened in Excel 2021 and the display and clicks were checked (2026-11-23 and 2026-11-29).ras run,ras testandras book dump/diffare checked by automated tests that create a project and runras(crates/ras/tests/offline.rs; Node 22 on Linux, Node 26 on Windows 11). The paths that use the VS Code executable as the runtime (when Node is not on the PATH, and when it is specified inRAS_NODE) have been verified on Windows. It has not been verified on macOS. The output ofras book dumpwas also checked with xljs's test workbooks (data validation, conditional formats, tables). Speed on large workbooks saved by Excel has not been measured.- Workbooks output by
ras packare re-read and checked with the independentovbacrate and oletools (olevba) (also run in CI). - The following has been verified on real Excel (Windows 11, Excel 2021 64-bit) (manually, since CI has no Excel):
- A workbook written with
ras packopens and the macros run. The VBA build output ofcrates/ras-compiler/tests/js/semantics.rasmatchessemantics.out - The parts of
RAS_Runtime.basthat deal with Win32 APIs andSAFEARRAY(in-place rewriting of the lower bound byRAS_Rebase, throttling inRAS_Yield,sleep/waitUntil), bulk Range ⇔ array transfer,@onevents, and restoring application state - Running
packagain on a workbook saved by Excel (containing compiled p-code), refusing to write to an open workbook, andunpack - The debug run (
ras_com.node) connects to an open workbook and gives the same results and error numbers as the VBA build
- A workbook written with
- User forms:
- Automated tests confirm that the generated designer storage (including embedded pictures) is unchanged when read back and rewritten, and that the value written for every property can be read back. Comparison against real Excel is done with the
tools/excel-checkscripts (Windows and Excel are required). Pictures converted from PNG and similar give the same result as specifying the converted BMP directly. - Extraction from a workbook is confirmed by automated tests on 10 forms saved by Excel: the read result is as expected, and writing back what was extracted gives the same design.
- Importing a form in live sync (the
.frm/.frxpassed toVBComponents.Import) and the generated code that setsComboBox/ListBoxitems were checked on real Excel 2021 by showing the imported form. The structure of.frxis checked against files written by Excel in automated tests.
- Automated tests confirm that the generated designer storage (including embedded pictures) is unchanged when read back and rewritten, and that the value written for every property can be read back. Comparison against real Excel is done with the
- Running forms:
- The debug run (§14.10.7) is checked by automated tests for the form runtime, and by connecting the VS Code panel to the runtime in Chromium (Playwright) (typing, clicking, selecting, tabbing, cancelling focus, the close button). On real VS Code (Windows), showing a form, typing, and closing it with a button to return a value were also checked.
- "Run in Excel" (
RAS_ShowForm, §14.11.8) was checked from a language server command on real Excel 2021: the form comes to the front and waits until it is closed.
- Importing an existing workbook (§14.7.1): importing and replacing with
ras packis checked by automated tests. Importing in live sync (reading code through COM, and reading forms written withVBComponent.Export) was checked on real Excel 2021 with workbooks containing hand-written standard modules, classes, forms and sheet modules (including ones with VBA compile errors): the result is the same files as importing withras pack, and after replacement it compiles and gives the same results. Importing code added in the VBE (§14.7.3) was also checked. Reading.frm/.frxis checked by automated tests: writing out a form saved by Excel and reading it again gives the same design. - Dialog monitoring in the debug run was checked for
notifyanddismisswith real Excel 2021 dialogs (run-time error, compile error,MsgBox, the confirmation for deleting a sheet, "Yes / No"). The decision rules follow those xlflow established on real machines (identifying buttons by control ID and access key, closing a run-time error with "End", and so on). - The Excel stand-in (§14.10.8) is compared with Excel 2021 (64-bit, Japanese) using
tools/standin-check(manual. The same scenarios as the automated tests are run on the stand-in, in a debug run through COM, and in VBA inside Excel, and the output and the workbook after the run are compared). What has been matched: operations that clear a copy, the selection after pasting, number formats that formulas inherit from their references, date number formats (NumberFormatism/d/yyyy; the display andNumberFormatLocalareyyyy/m/d), column widths of a saved workbook, howUniongroups ranges,Deactivatewhen a sheet is deleted, the names of added sheets, the error numbers andTypeNameofVBScript.RegExp, and hyperlinks (theFollowHyperlinkraised byFollow,ClearContentsalso clearing hyperlinks, theChangeraised byClearHyperlinks, and the underline and color ofHyperlinks.Add/Delete). Remaining differences:- The
typeNameof a numeric cell isLongwhen it is an integer (VBA givesDouble). An empty cell and a key missing from aDictionarybecomeNothingthrough COM (VBA givesEmpty), because the runtime does not distinguishEmptyfromNothing. - The
.textof a number or date that does not fit the column width does not become#####.Interior.ThemeColorreturnsnull. - The
codeNameof a sheet added to a workbook that has never been opened in the VBE is an empty string in Excel (the stand-in givesSheet2and so on). - Column widths in the positions of shapes and in
Range.Leftand the like are computed taking the default font to be Yu Gothic 11pt (a digit 8 pixels wide); in a workbook with another default font (Calibri and so on) they differ from Excel's. Inserting or deleting cells does not move shapes. - In a debug run through COM, a
TextStreamthat has not been closed is not released at the end of the variable's lifetime, so deleting the folder that holds the file may fail with error 70 (VBA closes it when the last reference goes away).
- The
- The initialization entry point (§12.3) has been checked on real Excel 2021 as follows (manually): when a macro opens a workbook and immediately closes it, Excel does not reopen the workbook (the version that deferred with
Application.OnTimereopened it and stopped at a security notice). When a workbook is opened in Protected View and editing is enabled (ProtectedViewWindow.Edit), the@on("Workbook.Open")handler is called fromWorkbook_ActivateandRange.Selectand the like succeed (in a hand-written workbook that calls them directly fromWorkbook_Open, this gives error 1004). It was also confirmed that the handler is called andRange.Selectsucceeds when you press "Enable Editing" on the ribbon (a macro warning appears) and then "Enable Content". - It has not been verified on 32-bit Office (for example the 32-bit offsets in
RAS_Rebase). - The VS Code extension has been checked to work on real VS Code.
- Dialogs built in code (dialog) have been checked on real Excel 2021: buttons, input fields, required-field validation, Esc, ×, and cancelling the progress bar.