Skip to content

About

Data-driven PDF report generation in Rust with Typst as the embedded engine — runs natively or as WebAssembly (e.g. Cloudflare Workers).

Topics

Resources

Contributing

Stars

3 stars

Watchers

2 watching

Forks

Repository files navigation

@casoon/renderreport

CI Crates.io Documentation License: MIT Rust Version

⚠️ Early Development Stage - This project is in active early development. APIs may change, and some features are still being implemented and optimized.

Data-driven report generation with Typst as embedded render engine.

Build professional PDF reports without learning Typst. Use components, themes, and template packs to create reports from structured data.

Terminal: renderreport render health-check.json -o health-check.pdf prints Written 35217 bytes to health-check.pdf; renderreport list-components | tail -1 prints 80 component(s).

Website: renderreport.casoon.de · Docs and examples: casoon.github.io/renderreport

Features

  • 80 components — score cards, findings, tables, charts, timelines, pricing cards, barcodes and more, each with a Rust builder and a JSON form.
  • Theme tokens — colours, fonts, spacing and page layout as named tokens, merged per request.
  • Template packs — page templates, components, themes and assets in a folder.
  • Embedded Typst — no Typst CLI; the engine compiles PDF/UA-1 tagged PDFs as a library.
  • CLI, Rust and Wasm — render from JSON on the command line, from Rust, or in a Cloudflare Worker.

Quick Start

use renderreport::prelude::*;

fn main() -> renderreport::Result<()> {
    let engine = Engine::new()?;

    let report = engine
        .report("default")
        .title("My Report")
        .add_component(ScoreCard::new("Quality", 95))
        .add_component(Finding::new(
            "Issue Found",
            Severity::Medium,
            "Description of the issue"
        ))
        .build();

    let pdf = engine.render_pdf(&report)?;
    std::fs::write("report.pdf", pdf)?;
    Ok(())
}

Installation

Library

Add to your Cargo.toml:

[dependencies]
renderreport = "0.7"

CLI

curl -fsSL https://raw.githubusercontent.com/casoon/renderreport/main/install.sh | sh

Downloads the archive for your platform from the latest release, verifies it against the published .sha256 file and installs the binary to /usr/local/bin. Set RENDERREPORT_INSTALL_DIR to install elsewhere, or VERSION to pin a release. On Windows, take the .zip from the releases page.

Official binaries come only from the GitHub releases of casoon/renderreport — built there by the release workflow, never on a developer machine. The npm package is published from the same workflow. To verify a download by hand, check the hash and the signed build provenance:

shasum -a 256 -c renderreport-v<version>-<target>.tar.gz.sha256
gh attestation verify renderreport-v<version>-<target>.tar.gz --repo casoon/renderreport

Documentation

The documentation covers everything beyond the quick start:

Contributing: CONTRIBUTING.md. Changes: CHANGELOG.md.

License

MIT

About

Data-driven PDF report generation in Rust with Typst as the embedded engine — runs natively or as WebAssembly (e.g. Cloudflare Workers).

Topics

Resources

Contributing

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages