Open-source DOCX infrastructure · Apache-2.0

The document engine,
not the dependency.

A deterministic Word-document runtime written in Rust. Import, edit, lay out, render, and write .docx on native, WebAssembly, and headless hosts — with no required server, DOM, or UI framework.

Your document never leaves the browser. The demo below runs the same Rust engine, compiled to WebAssembly.

opendoc.casualoffice.org/editor.html?demo=1 Full editor
Quarterly Fidelity Report
CasualOffice · Engine Working Group
Layout is measured against LibreOffice as the oracle: three of five corpus documents match page counts exactly, and the remaining two land within a single page. Click into this paragraph and type — the caret, selection, and glyph positions are drawn from the engine's own geometry, not the browser's.
Corpus document
Pages
Δ oracle
tables-nested.docx
14
0
Rust → WASM
One engine across every host
Byte-identical
Unedited packages reconstruct exactly
No server
Host owns storage, network, policy
Loss-aware
Preserved or reported — never dropped
Built for document systems

A runtime beneath your product — not another iframe around someone else's.

The normalized model and deterministic layout engine stay authoritative. The canvas is a rendering surface, never the source of truth.

01

Loss-aware DOCX

OOXML parses into a typed editable model. Unsupported package data is retained verbatim or surfaced explicitly — it does not vanish on save.

  • Semantic import and export
  • Byte-identical reconstruction
  • Compatibility dispositions
02

Deterministic layout

Shape, paginate, compose, and rasterize through one Rust pipeline with pinned inputs and regression gates on geometry and page output.

  • Paragraphs, tables, sections, floats
  • Backend-neutral display list
  • CPU fidelity oracle
03

Embeddable editing

Every mutation routes through a closed command set with inverses, selection anchors, and undo/redo. Network, storage, and auth stay yours.

  • Native, web, and headless targets
  • No mandatory React or provider
  • Sub-10 ms incremental repaint
A hard host boundary

Document semantics in Rust. Product policy in your hands.

The engine owns document state, transactions, selection, pagination, hit testing, and serialization. Your host owns files, fonts, network access, telemetry, permissions, and product UI.

Read the architecture
Inspect the real thing

Clone it, run the gates, open a document.

No account, no hosted backend, no opaque cloud service. Every pull request runs build, test, lint, docs, and WASM gates on the pinned toolchain.

quickstart
$ git clone https://github.com/CasualOffice/opendoc.git
$ cd opendoc
$ cargo test --workspace --all-features --locked

# run the same browser editor locally
$ ./webapp/build.sh
$ ./webapp/serve.py
Pre-release

Serious architecture. Honest support claims.

OpenDoc already imports, edits, lays out, renders, and writes real DOCX files. It is not yet a stable SDK or a pixel-perfect replacement for Word — fidelity is tracked with generated fixtures, LibreOffice comparisons, and CI gates rather than feature checkboxes.

Works today

Semantic import → model → write-back · Layout, tables, headers/footers, floats · Browser editor with hit-testing, caret, undo/redo, save

Capability-gated delivery

DOCX fidelity first. A broader document platform next.

P0
Loss-aware DOCX round-trip
Semantic import and export with byte-identical reconstruction of unedited packages
Shipped
P1
Deterministic layout and pagination
Paragraphs, tables, sections, and floats measured against a LibreOffice oracle
Shipped
P2
Embeddable browser editor
Hit-testing, caret, selection, formatting, undo/redo, and DOCX save — all client-side
Shipped
P3
Review and collaboration surface
Comments, tracked changes, and suggestions over the same closed command set
In progress
P4
Fidelity hardening
Text wrap around floats, inline math (OMML), and multi-column layout
Next
P5
Stable SDK and platform
Versioned Rust and WASM APIs, GPU backend, desktop shell, and more document formats
Planned
See the engine, not a mockup

Open the live editor with a real DOCX.

Rendering, selection, formatting, tables, links, undo/redo, and save — all client-side.