Skip to content

Language Bindings

Paul Gaston Gouron edited this page Aug 20, 2026 · 1 revision

Language Bindings

Ironpress exposes one rendering engine through Rust, Python, Ruby, and WebAssembly. Each package follows its language conventions while keeping the same portable converter controls.

Shared converter contract

Capability Rust Python Ruby WebAssembly
HTML and Markdown to PDF bytes Yes Yes Yes Yes
Reusable configured converter Yes Yes Yes Yes
Page size and margins Yes Yes Yes Yes
PDF and raster quality controls Yes Yes Yes Yes
Sanitization Yes Yes Yes Yes
Headers and footers Yes Yes Yes Yes
Custom TTF fonts Yes Yes Yes Yes
Optional CJK and emoji packs Yes Yes Yes Yes

Python and Ruby use snake_case methods. WebAssembly uses camelCase. The underlying options and safe defaults are the same.

Host-specific capabilities

Capability Rust Python Ruby WebAssembly
Constrained local resources Yes Yes Yes No
Direct file output Yes Yes Yes No
Streaming writer and async API Yes No No No
Opt-in remote HTTP resources Yes No No No

WebAssembly receives document and font bytes from its host. It cannot read local paths. Remote loading remains a Rust-only opt-in feature, so installing a language package never silently grants network access.

Release artifacts

Runtime Package Artifact contract
Rust cargo add ironpress Source crate for Rust 1.88+
Python pip install ironpress CPython 3.8+ ABI3 wheels and an sdist
Ruby gem install ironpress Ruby 3.0+ native gems and a source gem
WebAssembly npm install ironpress ES module and WebAssembly binary

Every package uses the same Ironpress version. Release CI builds, installs, and tests the generated Python, Ruby, and npm artifacts before publication.

Font packs

All bindings accept the same five optional fallback roles: cjk-jp, cjk-kr, cjk-sc, cjk-tc, and emoji. The renderer never downloads a pack. The host application fetches and verifies the artifact, then passes its bytes to the converter. See Font System.

Clone this wiki locally