Tech

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.

Author
Owen Mercer
Markets and Finance Editor
Published
Draft
Source: Hacker News · original
Tech
No image available
Silurus/ooxml project demonstrates AI-driven development with no human-written application code

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.

Continue reading

More from Tech

Read next: Apple to roll out manual EQ controls for AirPods in iOS 27 update
Read next: Apple rolls out visionOS 27, integrating AI-driven Siri into Vision Pro headset
Read next: Apple Overhauls Siri with Google Gemini Partnership and Standalone App at WWDC 2026