WordCraft: Open Source Word Clone in Pure Rust

WordCraft is alpha software, and its own roadmap says so. Here is what its formats, command layer, MCP server and logging do today, and where fidelity gaps remain.

Binary Buddies · 5 min read · 5 views

Teams that need a word processor they can inspect, script and embed usually hit the same wall: the files they receive are .docx, and the tools they can read the source of either don't carry the Word workflow or can't be driven by a program. WordCraft, a project from the ArtCraft team, claims to cover both. It is an open source, clean-room reimplementation of Microsoft Word in pure Rust, with the ribbon, styles, tables, track changes, references and mail merge.

The interesting question is not whether that sounds appealing. It is what the repository demonstrates, what it only asserts, and where an alpha-stage project will cost you time. This article goes through the claims in the README, using the commands and numbers the project itself publishes. Every figure below is the project's own.

What the project says it is

The README describes a word processor that reads and writes .docx, runs natively on macOS, Windows, Linux and BSD, and runs in the browser through WebAssembly. It is one Rust codebase, with no Electron and no Tauri. The UI is native egui drawing on the GPU. The licence is MIT OR Apache-2.0, so you can choose whichever of the two suits your compliance team.

It also states its own maturity, which many open source projects avoid doing. WordCraft is labelled alpha. The project estimates it covers 88% of Word's ribbon features with commands, and that it is about 60% of the way to replacing all of Word for real work. The estimates for a typical professional's weekly work and for everyday essentials are about 55% and 63%. These are self-assessments rather than measurements, but they give you a baseline and a place to argue with it, via ROADMAP.md and the parity assessment it points to.

Clean-room, and what that does and does not tell you

'Clean-room' here means the code was built from public specifications and observation, with every asset original or openly licensed. The repo backs the asset half with a mechanism: the CI task includes an asset-attribution check, so a bundled file without a recorded origin should fail the build.

That is useful provenance, but read it carefully. The README does not say anything about legal review. If your organisation needs a formal clean-room guarantee, you will have to read the history and contributor rules yourself. What you can say from the README is narrower: the stated method is public specs plus observed behaviour, and the licence is permissive.

Formats: what it opens, what it writes

The format list is broad. Here is what the README commits to:

  • Opens and saves .docx (OOXML), plus .odt, .rtf, .html, .md, .tex (LaTeX) and .txt.
  • Opens Word 97-2003 .doc files.
  • Exports PDF with real, selectable text, links and bookmarks.
  • Converts through the CLI to docx, pdf, odt, rtf, html, md, tex, txt and png.

Breadth of format is not the same as fidelity, and the roadmap is candid about this. Beta is gated on testing against real-world .docx files and on keeping charts and SmartArt through a round trip. So a file full of charts may not survive an open-and-save cycle intact. The log description adds a related detail: unreadable parts of a .docx, and pictures or fonts a PDF export had to leave out, are written to the log rather than failing silently. That tells you the project expects lossy cases and reports them.

Layout speed and the cached paragraph model

The performance claim is specific. Paragraph layout is cached, and typing in a 188-page document re-lays it out in about 1.4 ms. Pages render on demand rather than all at once. The mechanism matters more than the number: only the paragraph you edited is recomputed, and pages nobody is looking at are never drawn.

The same caching creates the project's other stated weakness. Beta requires pagination closer to Word's, so the page breaks you see may differ from the ones Word would produce for the same file. For a contract or a paginated report, that difference decides whether a table of contents has correct page numbers. A fast layout engine that paginates differently is a trade-off you should test with your own documents before trusting it.

One codebase for native and web

The build story is plain cargo. The desktop app runs with the sample document or a file you give it:

git clone https://github.com/storytold/wordcraft
cd wordcraft
cargo run --release -p wordcraft -- --sample
cargo run --release -p wordcraft -- report.docx

The web build lives in apps/wordcraft-web. You run trunk serve from that directory and open http://127.0.0.1:8771/?sample. The wasm build is part of CI, so the browser target is checked on every run instead of drifting. The screenshots in the README are produced by the project's own UI harness (cargo run -p wordcraft-ui-egui --example ui_shot), which renders offscreen. That is a good sign for anyone who wants to test UI behaviour without a display.

Every action is a command

The design decision that sets WordCraft apart from a conventional word processor clone is that every action has an id. The README says the same 422 commands drive the ribbon, keyboard shortcuts, command search, a command-line tool, a JSON control channel and an MCP server. That means there is one code path for a click and for a script.

The CLI shows what that looks like in practice:

wordcraft-cli convert report.docx report.pdf
wordcraft-cli text report.docx
wordcraft-cli inspect report.docx
wordcraft-cli run --template sample --cmd 'select.text={"text":"Membership"}' --cmd format.bold --save out.docx

inspect returns the document structure as JSON, which is what you want for automated checks. Macros use the same layer: tools.recordMacro records a command sequence and tools.macros manages playback.

Driving it from an AI agent

The MCP integration is the most concrete agent feature. Headless, you register it with claude mcp add wordcraft -- wordcraft-cli mcp. To confine the agent, you add --automation-read-root DIR and --automation-write-root DIR. To drive a running app, start wordcraft --control 7981 and connect with wordcraft-cli mcp --connect 127.0.0.1:7981.

The tool list includes list_commands, execute, batch, type_text, select_text, inspect_document, render_page and save_document. With a running app you also get screenshot, click and key. The useful detail is that agents can verify their work through inspect_document without taking screenshots, which is cheaper and less ambiguous than asking a model to judge an image. The folder roots are the control that matters for risk: without them, an agent with write access can save anywhere the process can.

Logging and what to attach to a bug report

The logging behaviour is documented in unusual detail, which matters in alpha software. The desktop app writes to standard error and to logs/wordcraft.log beside its preferences. On Linux that is ~/.config/wordcraft/logs/, on macOS ~/Library/Application Support/WordCraft/logs/, and on Windows %APPDATA%\WordCraft\logs\. Each launch moves the previous log to wordcraft.1.log and then wordcraft.2.log, so the log of a crashed run survives the next start. A log stops growing at 16 MiB.

Verbosity is controlled with RUST_LOG, for example RUST_LOG=warn,wordcraft_docx=trace to trace the docx crate alone, or RUST_LOG=info,wgpu_core=warn to quiet GPU noise. The privacy detail is worth noting: document text is never logged, and a panic message leaves out the text it quotes. Runs with WORDCRAFT_NO_PREFS log to standard error only, which is how agent test runs behave.

Where this approach does not fit

WordCraft is alpha, and the project says so. If your work depends on exact Word pagination, charts, SmartArt, or native printing, the roadmap lists those as unfinished. Do not move a document workflow onto it without round-tripping a sample of your real .docx files and diffing the results.

It also does not suit you if you need a vendor to hold accountable. The CI gate (cargo xtask ci: formatting, clippy, about 800 tests, the asset check, a layering check and the wasm build) shows engineering discipline, but a test count tells you nothing about how well your particular files are covered. The sensible use today is narrower: scripted conversion, agent-driven edits in a confined folder, and evaluation of the project as it approaches beta.

  • #MCP server
  • #Open Source
  • #Rust
  • #Word alternative
  • #WordCraft
  • #docx

Comments

Add a comment
Sign in with Google to join the conversation