typst-2-rsx
Convert Typst documents (.typ) into RSX elements as SVG components.
📌 Overview
typst-2-rsx is a Rust library that automates the conversion of Typst documents into RSX elements. It first uses the typst CLI to compile .typ files into .svg, and then parses the .svg file into RSX elements, making it easy to integrate Typst-generated content into Rust-based UI frameworks like Dioxus.
🚀 Installation
Using Cargo
Or manually add to Cargo.toml:
[]
= "0.1"
Then run the cargo build to compile.
📖 Usage
use typst_to_rsx;
let rsx_svg = typst_to_rsx.expect;
println!;
🔧 How It Works
- Compiles
.typto.svgusing thetypstCLI. - Parses the generated
.svgfile. - Transforms the SVG elements into RSX components.
🛠 Dependencies
📜 License
This project is licensed under MIT License.
💡 Need help? Open an issue or reach out to us on GitHub!