● Apache-2.0 · Native + wasm32

A document in, the same document out.

Quire opens a .docx, lays it out from real font metrics, and renders it — and when it saves, anything it didn't modify goes back byte-for-byte. CI checks that second part on 399 real files.

399/399 Corpus round-trip pass
< 50 KB Deferred collab chunk · gzip
< 8 ms p95 incremental reflow
sample-report.docx · Page 1/1 · A4
quire / specimen 595 × 842 pt

On save, every byte the engine didn't touch comes back unchanged; roundtrip --check verifies this file by file.

The browser tab and the desktop run the same layout core: same advances, same breaks, same display list.

¶ break points are golden-tested

Everything you see is a rendering target: display lists out, pixels in.

display list · your page UAX#14 · KP
OPC / XML Inspector UNTOUCHED · BYTE-EXACT
<!-- word/document.xml -->
<w:p>
  <w:pPr><w:jc w:val="both"/></w:pPr>
  <w:r><w:t>roundtrip --check</w:t></w:r>
</w:p>
<w:sectPr>
  <w:pgSz w:w="11906" w:h="16838"/>
</w:sectPr>

<!-- customXml/item1.xml -->
50 4B 03 04 14 00 06 00  ✓ untouched
08 00 00 00 21 00 A4 7C  CRC32 match

One lossless core, four document formats

Shared between them: the container handling and the byte-level round-trip guarantees. Not shared: the layout model — DOCX flows, XLSX grids, PPTX places boxes, ODT flows against the OASIS schema.

Roadmap →
DOCX Now

Flow

Lossless round-trip plus the line-breaking and pagination pipeline — everything the playground runs on.

XLSX In progress

Grid

Same OPC/lossless layer as DOCX. Workbook model, cell projection, style cascade and the formula engine (X3) are live; charts and the editing surface come next.

ODF In progress

Open

ODT renders today — upload one in the playground and it lays out in-browser from content.xml and styles.xml, mapped from the OASIS spec, not from DOCX. ODS and ODP follow.

PPTX In progress

Canvas

The lossless OPC container, package relation graph and a versioned <code>SlideScene</code> projection (P0–P2) are landed as a core crate on the same discipline, with DoS ceilings and honest refusal on non-presentation files. It is not in the shipped wasm yet and the Slides workspace still runs its own importer; shape-editing mutations and the presentation render list come next.

The pipeline.

Three stages, one Rust core, compiled twice. Each stage computes once — browser and desktop draw from the same numbers.

Stage 01 · parse

Every ZIP entry is kept, even the ones we ignore

The OPC container is unzipped entry by entry. Parts the engine understands become models; everything else — customXml, unknown extensions — is held in raw bytes and written back unchanged.

.docx zip document.xml ✓ styles.xml ✓ customXml/ ✓ held byte-for-byte for write-back
Stage 02 · shape + break

Real metrics, Knuth–Plass optimum

Text is measured against real font outlines; break points are chosen per paragraph to minimise total badness (Knuth–Plass), with UAX#14 deciding which breaks are legal at all. Output is locked by golden snapshots, so regressions show up as diffs.

break break greedy per-line vs KP per-paragraph
Stage 03 · paginate

One keystroke ≠ re-paginate the chapter

Paragraph caches reflow only the dirty interval; breaks settle in background passes. p95 incremental reflow under 8 ms. Output: a display list both renderers draw from.

cached dirty → reflow display list native · wasm

Reflow lab — drag it.

A feel for what reflow costs: the text here is laid out by CSS, not the engine — the point is the interaction, not the numbers.

Greedy (per-line) Ragged edge · tight/loose lines adjacent
An Office file is a container of thousands of declarations. Every declaration the engine didn't touch, every ZIP entry, every byte comes back unchanged on write-back; roundtrip --check verifies this file by file. The browser tab and the desktop share one layout core: the same shaped advances, the same optimal breaks, the same display list — the two can't come up with different answers.
Knuth–Plass (paragraph) Balanced spacing · total badness minimised
An Office file is a container of thousands of declarations. Every declaration the engine didn't touch, every ZIP entry, every byte comes back unchanged on write-back; roundtrip --check verifies this file by file. The browser tab and the desktop share one layout core: the same shaped advances, the same optimal breaks, the same display list — the two can't come up with different answers.

What CI enforces

399/399

real-world corpus files round-trip byte-identical in CI — ZIP64 and unknown extensions included

2 OS × 2 targets

the same gates run on ubuntu and Windows, each building native + wasm32-unknown-unknown (a macOS job exists but is paused for now)

< 50 KB

Gzipped deferred collaboration chunk — CRDT code ships separately; the core payload lands at 1.73 MB gzip, inside the CI budget (gzip ≤ 3 MB).

Untouched bytes come back identical

The ZIP layer copies entries it didn't modify byte-for-byte; roundtrip --check diffs that against a 399-file corpus on every commit.

One core, two targets

The engine compiles to native and wasm32-unknown-unknown. The browser shell is a thin platform adapter, not a second implementation.

Layering, checked by script

Format crates never import shells; shells enter through one engine API. check-layering.sh runs in CI, so the boundary doesn't depend on review memory.

Real typesetting

Shaped advances against real font metrics, Knuth-Plass optimal breaks, incremental pagination with p95 reflow under 8 ms (benchmarked in-repo).

The editor shell, as it stands

One static shell, three workspaces, no server behind any of it. Each line below is something the deployed pages do today.

Open the editor →
Template market

Nine built-in presets and nine downloadable packs, kept in your browser's IndexedDB and listed in each workspace's Design tab.

Embed protocol

Mount a workspace in your own page over postMessage; origins you didn't declare are dropped rather than obeyed.

Phone layout

The rail becomes a bottom bar and the ribbon a drawer pinned to the right edge, so nothing important falls off a 390 px screen.

Live thumbnails

The slide strip draws the real slide at true type size, mounting off-screen pages lazily instead of rebuilding all of them.

What you can use today

The engine is licensed Apache-2.0 and the repository is public: github.com/quire-office/quire — the code, the 399-file DOCX corpus, the 57-file ODT corpus and the CI gates all run on every push. Two browser shells run that engine compiled to wasm: the playground on this site renders real files in-tab and stays a read-only preview by design; the published editor at editor.quireoffice.dev/word.html completes the editing loop (typing, formatting, tables, images, undo/redo, save-to-download) on the same engine release, and spans three workspaces on one hub — Docs, Sheets and Slides. A desktop app and the collaboration server remain on the roadmap.