Skip to content
erscholtzPublic

About

Language to write documents in

Resources

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

pyrus

A domain-specific language (DSL) for creating styled documents. Pyrus aims to be an alternative to LaTeX and Typst, giving you fine-grained control over document styling using CSS while compiling to PDF. It is also possible to seperate out content into component-like structures that can be defined by the user.

Quick Start

Building

cargo build --release

Running

# Run with the test input file
cargo run -- temp.ink

# Or run the compiled binary directly
./target/release/pyrus temp.ink

Testing

cargo test

Dependencies

Package Version Purpose
krilla 0.9.1 PDF generation backend

Project Status

The compiler pipeline is currently implemented through HIR (High-Level IR):

It is posible to fully use the Pyrus compiler in its current form and create documents.

  • Lexer
  • Parser
  • HIR
  • CSS Layout Engine and Attribute tree
  • PDF Rendering Backend

Future Work

  • Turing complete scripting
  • Default styling and settings
  • Formula support
  • --watch and incremental compilation
  • LLVM's MLIR passes
  • multiple file and project support
  • embedding support as framework for other projects

Example

See resume.ink for a sample document:

cargo run -- temp.ink

License

See LICENSE for details.

About

Language to write documents in

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages