GridCraft Rebuilt Excel in Rust and Turned Every Command Into an API

A clean-room spreadsheet where one engine drives a desktop GUI, a browser build, a CLI, and an MCP server for AI agents.

10 min read • View on GitHub • More from storytold

An overhead view of a sealed glass drafting room. A large drafting table holds a hand-inked spreadsheet grid being drawn from scratch with a compass, straightedge and pen; one cell near the center is filled solid black ink. A thick closed reference manual is being passed through a narrow slot in the glass wall. A single hand holds the pen.
A clean-room reimplementation is a redrawing, not a photocopy. GridCraft reproduces Excel's behavior from spec and observation, then rebuilds the machine underneath it.
Key Takeaways

One Engine, Four Front Doors

Press Enter in the GridCraft desktop app and a command object fires. That exact object could just as easily have arrived from a browser tab, a shell script, or an AI agent talking over the Model Context Protocol. The desktop window is not the application. It is one of four front doors onto the same engine.

The four heads are a native desktop app built on eframe and egui, the same UI compiled to WebAssembly for the browser, a headless gridcraft-cli, and an MCP server for agents. Behind all of them sits crates/engine, which exposes a Session type and more than twenty command modules. Below that, crates/core holds the coordinate system, values, and error types with no workspace dependencies at all. The engine is the single integration layer, and everything else is a rendering of it.

Most "AI plus spreadsheet" projects bolt an assistant onto a legacy engine. GridCraft inverts that. It built the engine first and made agent-drivability a first-class requirement rather than a plugin, which is why the same verbs that move a cell in the GUI can move one from a language model.

A fast, open-source, clean-room take on the Excel workflow.

GridCraft project, Project description on GitHub · storytold/gridcraft on GitHub

A Studio, Three Office Clones, and a Clean Room

GridCraft comes from ArtCraft, a studio led by Brandon Thomas, and it shipped alongside two siblings: WordCraft for documents and DeckCraft for presentations. All three are Rust rewrites of the Office formats, published under the storytold GitHub organization. GridCraft handles the spreadsheet.

The "clean-room" label is doing real work. It means the XLSX behavior is reproduced from specification and observation rather than copied code. For a file format this old and this idiosyncratic, that is the harder path. Excel's coercion rules, its date serials, its error semantics, and its bijective column naming are all quirky enough that reproducing them from a spec is its own kind of research project.

The project's own framing is deliberately humble about where it stands. The repository labels GridCraft alpha and says the core workflow works end to end while depth, fidelity, and file compatibility are still rough. That framing matters for everything that follows: this is a live experiment, not a finished replacement.

No subscription, no licence server, no telemetry.

GridCraft project, Project statement on GitHub · storytold/gridcraft on GitHub

What Actually Runs When You Press Enter

A command in GridCraft is data, not a method call buried in a UI handler. It enters through one of the four heads, passes into the Session, mutates a copy-on-write snapshot of the workbook, and triggers a recalculation that ripples only through the cells that actually depend on the change.

That last part is why it stays fast. The engine maintains a dependency graph, so editing A1 does not recompute the whole sheet. It recomputes A1's transitive dependents and nothing else. The grid itself is virtualized, drawing only the cells in view. Together those two choices are what let a from-scratch spreadsheet feel responsive rather than sluggish.

The diagram below makes the architecture concrete. Send a command from any front door and watch it travel into the Session, mutate the workbook, and return a response only to the door that asked.

Four front doors, one Session, one recalculation. Click any door to send a sample command and watch it route through the engine and back.

The Spreadsheet That Refuses to Panic

The first thing a reader sees in several GridCraft source files is a lint block that bans the usual escape hatches. This is enforced by the compiler, not by convention.

#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic,
        clippy::unimplemented, clippy::todo, clippy::unreachable)]

The workspace also sets unsafe_code = "forbid" globally. For a spreadsheet, this is not a style preference. A spreadsheet eats arbitrary user input, and a panic in the formula parser is a data-loss event. Where other code reaches for .unwrap(), GridCraft reaches for unwrap_or_else, tolerates a poisoned mutex rather than crashing, and returns Option from its coordinate arithmetic using checked and saturating adds.

An extreme close-up of two adjacent spreadsheet cells, A1 and B1. Each cell contains a formula, and a curved arrow from each cell points to the other, the two arrows meeting to form a taut knot in the space between the cells. A small paper tag hanging from the knot reads 'Circ'. The surrounding cells are clean and empty.
Excel resolves an unbreakable circular reference by quietly showing 0. GridCraft keeps the error explicit, because a spreadsheet should never silently lie.

The sharpest expression of the same idea is the error type. GridCraft mirrors Excel's full error set, from #DIV/0! to #SPILL!, and adds one of its own: CellError::Circ, a circular reference that could not be resolved. Excel shows a silent 0 for this case, which is a well-known source of quietly wrong answers in real workbooks. GridCraft keeps it visible. A spreadsheet that refuses to panic and refuses to lie is one coherent stance.

Where GridCraft Sits

The honest axis here is not better or worse. It is shape. GridCraft is the only row below that is simultaneously Rust-native, WebAssembly-capable, and exposes a documented agent command surface. The mature rows win on decades of real-file fidelity.

ProjectNative stackAgent control surfaceFormat focusMaturity
GridCraftRust, egui/eframe, WASMJSON channel, MCP server, CLIXLSX native, CSV/TSV/JSON/HTML exportAlpha, self-reported ~50% real-work readiness
Excel / Microsoft 365Proprietary nativeCopilot and add-insXLSX, the compatibility benchmarkDecades of production use
LibreOffice CalcC++, nativeNone documentedODF native, strong OOXML filtersMature, stable release branches
ONLYOFFICE Desktop EditorsC++, nativeNone documentedOOXML compatibility focusMature for Office-format exchange
Apache OpenOffice CalcC++, nativeNone documentedODF, older OOXML supportEstablished but slow-moving
Google SheetsCloud, browser-firstApps Script and APIProprietary cloud formatMature, real-time collaboration
GnumericC, GTKNone documentedXLSX/ODF import and exportLongstanding, Linux-focused

Maturity and compatibility figures for GridCraft are self-reported and dated. Treat them as project estimates, not independent test results. The alternative suite details draw on the comparative coverage at pasqualepillitteri.it.

Alpha, and Honest About It

The project publishes its own report card, and it is not flattering. The repository describes coverage of roughly 89% of its catalogued Excel ribbon commands and 513 of 523 worksheet functions, while estimating about 50% readiness for real work. A separate guide reports a slightly different function count of 501 of 523, which is a useful reminder that these numbers move and vary by source.

GridCraft is in alpha: the core workflow works end to end, but depth, fidelity and file compatibility are still rough.

GridCraft project, Project status statement on GitHub · storytold/gridcraft on GitHub

The practical verdict follows from those numbers. For personal sheets, budgets, lists, smaller calculations, modern formulas, and experimentation with agent control, GridCraft is a genuinely novel proposition. For exchanging complex workbooks with Excel users, or for very large files, the mature tools remain the safe choice until real-world fidelity is independently demonstrated.

That is the interesting thing about GridCraft. It is not competing on compatibility today. It is running an experiment in what an office app looks like when being drivable by an agent is a requirement from the first commit, not a feature bolted on later.

weighted by what Excel users rely on, we estimate it is about 50% ready for real work.

GridCraft project, Project estimate on GitHub · storytold/gridcraft on GitHub