Typster

February 22, 2026 · 1 min read
projects

Typster is an Elixir wrapper for Typst, providing ergonomic functions for rendering Typst templates to PDF, SVG, and PNG formats. Powered by Rust via NIFs for high performance.

Key Features

  • Multiple output formats - render to PDF, SVG, or PNG
  • Variable binding - inject Elixir data into templates with deep nesting support (maps, lists, nested structures)
  • Package support - use Typst packages from the official registry with automatic download and local caching
  • PDF metadata - embed title, author, keywords, and more
  • Fast - Rust-powered NIFs; typical invoice rendering in under 50ms
  • Fully thread-safe - designed for concurrent use in Phoenix applications, tested with 100 concurrent renders

Example

template = """
= Invoice for #customer_name

*Date:* #invoice_date
*Amount:* \\$#amount
"""

variables = %{
  customer_name: "Acme Corp",
  invoice_date: "2025-10-03",
  amount: 1234.56
}

{:ok, pdf} = Typster.render_pdf(template, variables: variables)

Tech Stack

LayerTechnology
LanguageElixir
Native CodeRust via Rustler NIFs
TypesettingTypst
TestingExUnit + StreamData (property-based)
DistributionHex.pm with precompiled binaries
Authors
Software Developer
Software developer passionate about building great tools and applications.