Open-source DOCX infrastructure

Build documents on an engine you control.

OpenDoc is a deterministic, loss-aware document engine written in Rust. Import, edit, lay out, render, and write .docx across browser, desktop, and headless environments — with one authoritative model.

  • Apache-2.0
  • Rust → WebAssembly
  • No required server
editor.html?demo=1 Open full screen
Rust coreOne document model
WebAssemblyRuns in the browser
NativemacOS and Windows in CI
HeadlessAutomation and rendering
Loss-awarePreserved or reported
Why OpenDoc

A document runtime, not a web-editor wrapper.

The document itself is the source of truth. The canvas is a rendering surface; UI, storage, authentication, and network policy stay yours.

01

Own the document model

DOCX parses into a typed, editable model instead of being flattened into browser markup.

  • Semantic import and export
  • Byte-identical save of unedited packages
  • Unsupported data retained or reported
02

Deterministic layout

One Rust pipeline shapes, paginates, hit-tests, and renders across every host.

  • Engine-owned caret and selection geometry
  • Tables, sections, columns, floats, math
  • Backend-neutral display list
03

Bring your own product

Every edit routes through a closed command set with undo. Everything around it is yours.

  • No mandatory UI framework
  • No required cloud service
  • Browser, native, and headless targets
Architecture

One engine. Clear boundaries.

Document semantics live inside OpenDoc. Product policy lives inside your host. That line is the whole design, so it is drawn rather than described.

Read the architecture
Evidence, not promises

Fidelity you can check.

What is supported, how it was measured, and where the gaps still are — including the ones we have not closed.

Page-count parity Measured 2026-07-27
4 / 5

corpus documents matching LibreOffice's page count exactly; worst delta +2. A manual measurement, not yet a CI gate.

Construct familyRenderedEditable
Paragraphs & textFullFull
TablesPartialFull
Tracked changesPartialPartial
Vertical & rotated textNoneNone
All 27 construct families
Design principle Loss-aware
“Preserved or reported — never silently dropped.”

Content the engine does not understand is carried through untouched or named in a compatibility report. Of 27 graded families, 21 round-trip in full.

How they render today
  • 7 fully
  • 16 partially
  • 1 kept, not drawn
  • 3 not yet
Developer first

Clone it. Run it. Inspect the engine.

No account, no hosted backend. Every pull request runs the same gates you can run locally.

Putting the editor in your own page has its own guide: Embed the editor.

  1. Clone the repositoryApache-2.0 and source-first.
  2. Run the quality gatesBuild, test, lint, docs, and WebAssembly.
  3. Open a real DOCXIn the browser editor, or embed the runtime.
quickstart
$ git clone https://github.com/CasualOffice/opendoc.git
$ cd opendoc
$ cargo test --workspace --all-features --locked

# run the browser editor locally
$ ./webapp/build.sh
$ ./webapp/serve.py
Delivery

Where it is, and where it is going.

Shipped, active, and planned are kept separate, so a pre-release reads as a status rather than a promise.

Shipped

Loss-aware DOCX

Semantic import and export, and byte-identical save of unedited packages.

Shipped

Deterministic layout

Paragraphs, tables, sections and columns, floats with text wrap, and math.

In progress

Editing to Word parity

Comments, tracked changes, and every editing surface held to the Word and Docs standard.

Planned

Real-time collaboration

Operational transformation over the same transactions, with snapshot and replay versioning.

Not yet: hyphenation · vertical and rotated text · floating tables. Full roadmap

Open a document. Inspect the engine.

No account required for the demo. No opaque hosted backend.