Skip to content

sermuns/ratatypst

Repository files navigation

ratatypst banner

finally.. ratatui in Typst..

Built With Ratatui

demo

This is a terribly barebones and shitty proof-of-concept for writing Ratatui apps for Typst.

Inspired by soviet-matrix

Try it out!

  1. Use ratatypst-core in your Rust project:

    cargo add --git https://github.com/sermuns/ratatypst
  2. Write a Ratatui app (see examples in examples/) that uses ratatypst_core::TypstBackend for the backend.

  3. Compile the Rust code, see the Justfile for inspiration. Make to use wasm32-unknown-unknown target and #import the .wasm file as a WASM plugin in your Typst code.

  4. Render the PDF, either:

    • Edit the .typ file with typst-preview.nvim which can re-render a preview on every keystroke.

    • Use typst CLI (not as cool)

      typst watch main.typ

      which automatically recompiles PDF everytime the .typ is saved with modifications.

Disclaimer

This code is 100% certified human-slop. No artificial intelligence was used in the making of this.

brainmade

About

PoC Typst package to render Ratatui apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors