Repository navigation
RasgaPDF v0.3.0: 100% Pure Rust ISO 32000-1 Engine & WebAssembly Support
RasgaPDF v0.3.0 represents a major architectural milestone: complete elimination of the mupdf C-dependency and its heavyweight build toolchain requirements (C/C++ compilers, MSBuild), replacing it with an internal, pure Rust PDF engine built directly from the ISO 32000-1 specification.
Key Highlights and Architectural Changes:
-
100% Pure Rust ISO 32000-1 Engine (src/engine/):
- Custom memory-safe parser, lexer, xref cross-reference table resolver, and zlib/flate decompressor.
- Zero C/C++ toolchain requirements during build (cargo build works out of the box).
- Cross-compilation to any platform (Linux, Windows, macOS, Musl, WASM) without native link errors.
-
WebAssembly Browser Playground:
- Compiled pure Rust engine to WebAssembly (rasgapdf.wasm).
- Full client-side PDF parsing and 2D spatial layout directly in the browser with ~8 ms latency.
-
Spatial 2D Geometry and Typography:
- Adobe Core 14 AFM (Helvetica, Times, Courier) font metric tables for sub-millimeter bounding box precision.
- Recursive Form XObject parsing and robust CMap / /ToUnicode glyph stream decoding.
- Automatic filtering of phantom whitespace/non-breaking space spans (\u00A0).
-
Direct In-Memory Image Extraction:
- Extraction of embedded raster image streams (JPEG DCTDecode, PNG FlateDecode, MIME) directly into byte arrays with SHA-256 content hashing.
-
2D Vector Path Recognition:
- Full path operator parsing (re, m, l, c, v, y, h, f, S) for drawing, separator lines, and chart analysis.
-
Supply Chain and Security Hardening:
- Neutralized third-party vulnerabilities (python-multipart >= 0.0.22).
- Strict Token Permissions, zero binary artifacts in git tree, and 100% passing automated CI suites.
-
Multi-Ecosystem Parity:
- Python (PyPI): Pure wheel + native FFI with LangChain (RasgaPDFLoader) and LlamaIndex (RasgaPDFReader) support.
- Node.js (npm): Hardened Koffi FFI binding without shell/environment variable accesses.
- .NET (NuGet): Multi-platform runtime packaging (win-x64, linux-x64).
- Go: Module path github.com/MartinsMessias/rasgapdf/bindings/go aligned with v0.3.0 C-ABI.
Full Changelog: v0.2.6...v0.3.0