Linch DOCX
DOCX Library for Rust
A reliable DOCX reading and writing library for Rust with round-trip preservation. Unrecognized elements and attributes are preserved during open-modify-save cycles, ensuring no data loss.
Why Linch DOCX
Round-trip Preservation
Three-level preservation strategy ensures no data loss: unvisited parts kept as raw bytes, unknown elements and attributes preserved, format details retained.
Pure Safe Rust
Zero unsafe code blocks. Fully leverages Rust's type system for compile-time safety and reliability.
Intuitive API
API design inspired by python-docx. Simple and clean interface for reading, creating, and modifying DOCX documents.
Get started
Install via Cargo and explore the API documentation.
Try it
Add the crate to your Rust project.
Download
Source code and release history.
Roadmap
- Images and drawings support
- Headers and footers
- Complete style management
- Table creation and modification
- Lists and numbering
- Comments and tracked changes
FAQ
What is round-trip preservation?
It means unrecognized XML elements and attributes are kept intact during open-modify-save cycles, so you won't lose data or corrupt documents.
Is the API design inspired by other libraries?
Yes. The API design draws inspiration from python-docx, aiming for a simple and intuitive interface.
Is the project ready for production?
Not yet. The library is under active development. Basic reading, writing, and round-trip preservation are working, but some features are still missing.