Anthropic’s Claude generates pixel-perfect Office document viewer in browser
A new GitHub repository features a browser-based viewer for .docx, .xlsx, and .pptx files, rendered via WebAssembly and Canvas, with the entire codebase attributed to iterative prompting of Anthropic’s AI assistant.
A GitHub repository named office-open-xml-viewer, attributed to user yukiyokotani, has been published under the project name Silurus/ooxml. The project provides a browser-based viewer for Office Open XML documents that renders content to an HTML Canvas element. Notably, the repository states that the entire codebase—including Rust parsers, TypeScript renderers, tests, and tooling—was implemented by the Anthropic AI assistant Claude through iterative prompting, with no human-written application code.
The parsers are written in Rust and compiled to WebAssembly, while the renderers utilise the Canvas 2D API. The package is ESM-only and embeds .wasm files. It includes an opt-in math engine, approximately 3 MB in size, using MathJax and STIX Two Math for rendering OMML equations in .docx and .pptx files. This engine is tree-shaken if not imported, meaning the bundle size remains small for users who do not require equation rendering.
Text selection is currently achieved via a dual-layer approach, rendering glyphs to the canvas while overlaying a transparent DOM layer for native browser selection. The project plans to migrate to a single DOM-as-source-of-truth pipeline once the Canvas drawElement API, proposed in WICG/html-in-canvas, becomes widely available across browsers.
Each format exposes a headless engine, allowing developers to compose custom user interfaces such as scroll views or thumbnail grids. The rendering stays on the main thread to ensure the canvas shares the document's FontFaceSet, avoiding silent font fallbacks that could alter text measurements and wrap positions.
The project is fully self-contained, requiring no network or cross-origin requests. Bundlers such as Vite and webpack can integrate the package with specific plugins or configuration settings to handle the embedded WebAssembly files.


