Skip to content

rword introduction ​

rword is a GPU-accelerated OOXML (.docx) document editing library written in Rust. A single editing core runs on both native (Vello + Parley + masonry/xilem) and the browser (WebAssembly + WebGPU), producing byte-identical layouts on both ends.

rword is a library, not an application: it exposes a single WordComponent — you can think of it as a rich-text <textarea>. The host owns the window and event loop and forwards input events; rword owns document state, layout, and rendering.

Core capabilities ​

  • Native .docx support — read/write ISO/IEC 29500: nested tables, styles, numbering, headers/footers, sections, images, content controls; a stack-based parser handles arbitrarily deep nesting
  • One core, two outputs — native and WebAssembly share the same document model, editor, layout engine (Parley), and GPU renderer (Vello), with no platform branching
  • Pure GPU rendering — Vello on desktop + WebGPU in the browser, no Canvas2D software fallback; page size comes from the document itself (paper-desktop model), not the viewport
  • Full editing model — cursor and selection, CJK IME composition, undo/redo (command pattern), find-and-replace across body and headers, tables (split/merge/shading), lists, sections, headers/footers
  • Structured document tags (SDT) — form controls span every layer: text, dropdown, multi-select, checkbox, date, number; with dictionaries, data binding, validation, and locking
  • Ready-made integration entry points — web: @office-rs/rword TypeScript SDK (no special bundler plugin), desktop: rword-xilem-view (masonry Widget + xilem View wrapper)

Integration entry points ​

ScenarioEntry pointNotes
Web SPA / framework app@office-rs/rword npm packagewasm-pack --target web artifact, loaded via fetch(), no Vite WASM plugin
Desktop xilem apprword-xilem-view cratemasonry WordWidget + xilem word() view
Desktop Taurirword tauri-app reference implementationWindows NSIS / MSI installers, Releases

Browser requirements ​

WebGPU browser requirements ​

The web build of both libraries depends on WebGPU, with no Canvas2D software fallback.

BrowserMinimum versionNotes
Chrome / Edge113+Works out of the box on desktop
FirefoxNo stable release yetManually enable dom.webgpu.enabled
SafariUnsupportedNo fallback path currently

If the browser does not support WebGPU, the editor area will appear blank or show a load-failure message.

You can check your current browser's capabilities via WebGPU Report.

Live demo ​

Deployed at /rword/ (requires a WebGPU-capable browser).

Released under the Apache 2.0 License.