quillmark-core 0.58.0

Core types and functionality for Quillmark
Documentation

Quillmark

Crates.io PyPI npm CI License

A format-first Markdown rendering system that converts Markdown with YAML frontmatter into PDF, SVG, PNG, and other output formats.

Maintained by TTQ.

UNDER DEVELOPMENT

Features

  • Format-driven design: Quills define structure and styling; Markdown provides content
  • Schema-backed validation: Strong field coercion and validation via QuillConfig
  • Multiple backends: Typst backend supports PDF/SVG/PNG output
  • Structured diagnostics: Path-aware errors and warnings
  • Dynamic workflow path: Add runtime assets/fonts through Workflow

Documentation

Installation

cargo add quillmark

Quick Start (Rust)

use quillmark::{OutputFormat, Quillmark, RenderOptions};

let engine = Quillmark::new();
let quill = engine.quill_from_path("path/to/quill")?;

let markdown = r#"---
QUILL: my_quill
title: Example
---

# Hello World
"#;

let result = quill.render(
    markdown,
    &RenderOptions {
        output_format: Some(OutputFormat::Pdf),
        ppi: None,
    },
)?;

let pdf_bytes = &result.artifacts[0].bytes;
# Ok::<(), quillmark::RenderError>(())

For dynamic asset/font injection at render time:

# use quillmark::{Quillmark, ParsedDocument};
# let engine = Quillmark::new();
# let quill = engine.quill_from_path("path/to/quill")?;
let mut workflow = engine.workflow(&quill)?;
workflow.add_asset("logo.png", vec![0, 1, 2])?;
let parsed = ParsedDocument::from_markdown("---\nQUILL: my_quill\n---\n# Hello")?;
let result = workflow.render(&parsed, None)?;
# Ok::<(), quillmark::RenderError>(())

Examples

cargo run --example appreciated_letter
cargo run --example usaf_memo
cargo run --example taro

Project Structure

  • crates/core - Core parsing, schema, and backend traits
  • crates/quillmark - Rust orchestration API
  • crates/backends/typst - Typst backend
  • crates/bindings/python - Python bindings
  • crates/bindings/wasm - WebAssembly bindings
  • crates/bindings/cli - Command-line interface

License

Licensed under the Apache License, Version 2.0. See LICENSE.