TL;DR

Silurus/ooxml is a new open-source project that renders DOCX, XLSX, and PPTX files in the browser using Rust parsers compiled to WebAssembly. It offers pixel-perfect rendering via HTML Canvas, enabling customizable, in-browser Office document viewing without server dependencies.

Silurus/ooxml has launched as an open-source library that renders Office Open XML documents—such as DOCX, XLSX, and PPTX—in the browser with pixel-perfect accuracy, using Rust-based parsers compiled to WebAssembly. This development matters because it enables high-fidelity, customizable Office document viewing directly in web applications without relying on server-side conversions or proprietary viewers.

The project comprises Rust parsers for each Office format, compiled into WebAssembly modules, and TypeScript renderers that draw documents onto HTML Canvas elements. The parsers process ZIP archives of Office files into JSON models, which are then rendered in the browser with full control over layout and appearance.

One notable feature is the support for rendering OMML equations in DOCX and PPTX files, achieved through an optional MathJax + STIX Two Math engine. This engine is approximately 3 MB but can be tree-shaken away if equations are not used, making the library flexible for different use cases.

The library also exposes a headless API, allowing integration into custom UIs, such as thumbnail grids or scroll views, beyond the default viewer. It supports multiple formats simultaneously and allows developers to embed only the components they need, reducing bundle size.

Why It Matters

This development is significant because it offers a high-fidelity, open-source alternative to proprietary Office viewers, enabling web developers to embed Office document rendering directly into their apps. It also opens possibilities for offline, secure, and highly customizable document workflows, especially in enterprise and educational contexts.

Moreover, the use of Rust and WebAssembly ensures performance and security, while the modular architecture allows for tailored implementations that can omit large features like the math engine if unnecessary.

Amazon

WebAssembly Office document viewer

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Prior to this, rendering Office documents in the browser typically relied on server-side conversion to PDF or images, or proprietary solutions with limited customization. The project builds on recent advances in WebAssembly and Rust, leveraging these to create a fully client-side, pixel-accurate rendering pipeline. The initiative follows a broader trend toward open-source, WebAssembly-based document processing tools, but distinguishes itself through its focus on fidelity and customizability.

The project’s architecture involves separate parsers for each format, compiled into WASM, which communicate with TypeScript renderers that draw on HTML Canvas. This design allows for efficient, precise rendering and flexible UI integration.

“Silurus/ooxml enables pixel-perfect rendering of Office documents directly in the browser, with full control over layout and appearance.”

— Project lead (via official documentation)

“Our goal was to create a fully client-side, open-source solution that offers both performance and customization for Office document rendering.”

— Author of the project (via GitHub repository)

Amazon

pixel-perfect Office document rendering software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how well the library performs with very large or complex documents, or how it handles all Office features such as macros or embedded media. Compatibility with older browsers and mobile devices remains to be tested extensively. Additionally, ongoing development may introduce new features or optimizations.

Amazon

browser-based DOCX XLSX PPTX viewer

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include expanding format support, improving performance with larger documents, and integrating the library into popular web frameworks. Developers are encouraged to experiment with the demo in the Storybook environment and contribute to ongoing development.

Further updates are expected as the project matures, with potential for official releases and broader adoption in enterprise and educational tools.

Amazon

open-source Office document renderer

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

Can I use Silurus/ooxml in production?

Yes, as an open-source project, it is suitable for integration into production environments, especially for custom web applications requiring in-browser Office rendering. However, testing for your specific use case is recommended.

Does it support all Office features?

Currently, it supports core document features and equations in DOCX and PPTX. Support for macros, embedded media, or advanced features is limited or not yet implemented.

What are the performance implications?

The parsers are compiled to WebAssembly for efficiency, but rendering large or complex documents may still impact performance. The library is designed to be modular, allowing developers to include only necessary features to optimize performance.

Is it compatible with all browsers?

It relies on WebAssembly and HTML Canvas, which are supported in modern browsers. Compatibility with older browsers or mobile devices may vary and requires further testing.

Source: Hacker News

You May Also Like

Building a web server in aarch64 assembly to give my life (a lack of) meaning

A developer has created a static HTTP web server entirely in Aarch64 assembly on MacOS, exploring low-level system calls and server mechanics.

Coreutils for Windows

Microsoft has launched a preview of core UNIX utilities for Windows, enabling native use of Linux-style commands with full compatibility and pipelines.

Redis 8.8: New array data structure, rate limiter, performance improvements

Redis 8.8 releases with a new array data structure, rate limiter, message NACKing, and significant performance improvements, enhancing flexibility and efficiency.

Rewrite Bun in Rust has been merged

The Bun JavaScript runtime has merged a rewrite in Rust, passing all tests, reducing binary size, and improving performance, with further optimizations underway.