Skip to content
Open to SDE roles · full-time and internships +91 90504 57303
Work/02
Mar – May 2025 · Systems programming · Team project

Sparse spreadsheet in Rust

The same idea, rebuilt for scale. Sparse storage means empty cells cost nothing, cell indices are usize so there is no fixed size, and the engine runs right here as WebAssembly.

RustSparse storageusize indexingUndo/redoWebAssemblyAWS S3
2–3 min → sfull recalculation, minutes down to a few seconds
usizecell indices, no fixed sheet size
47,525 croreaddressable cells, up to ZZZZ999999
2deploys: GitHub Pages and AWS S3
  • Sparse block storage means a sheet with ten values uses memory for ten values, so the grid is no longer capped at 1.8 crore cells.
  • An operation stack records the old and new state of every edit, so undo and redo are exact, with floating-point values throughout.
  • The engine is a Cargo workspace library with no I/O: the CLI, this WebAssembly build and the S3 static site all call the same code.
How it works

The story, in chapters.

Chapter 1

Only filled cells cost anything

The C version stores every cell up front. Here the grid is sparse: cells live in blocks that exist only once something is written. A sheet with ten values uses memory for ten values.

Indices are usize, so the sheet is not capped at 1.8 crore cells. ZZZZ999999 works.

Chapter 2

Minutes became seconds

With sparse storage and a faster dependency engine, a full recalculation on very large sheets dropped from 2–3 minutes to a few seconds.

Chapter 3

Undo, redo and decimals

Every edit is recorded on an operation stack with its old and new state, so undo and redo are exact. Values are floating point, with clean errors for bad formulas.

Chapter 4

A library first, a CLI second

The engine is a Cargo workspace library with no idea a terminal exists. The CLI, this browser build and the AWS S3 static site all call the same code.

Team project: we designed the engine together.

Try it

Run it yourself.

Live · the real Rust engine, compiled to WebAssembly
Loading the engine…
Click a cell and type a formula, or try a button.
The real program, recorded.The real program. Scroll to play it, scroll back to rewind.
Next project
Taylor-Line microswimmers
Keep going
CV Contact