Developer Guide
This guide covers environment setup, building, testing, and documentation for typstyle.
Prerequisites
- Rust stable toolchain with cargo
- Node.js and yarn (for web assets)
- cargo-nextest and cargo-insta (for testing)
- shiroa (for documentation)
Initial Setup
Clone and build the project:
git clone https://github.com/typstyle-rs/typstyle.git
cd typstyle
cargo build # Debug build
cargo build --release # Release build
Install required tools:
# For testing
cargo binstall cargo-nextest cargo-insta
# For building wasm
cargo binstall wasm-pack
# For documentation
cargo binstall shiroa
Workspace Layout
crates/typstyle/
— formatter CLIcrates/typstyle-core/
— core formatting logiccrates/typstyle-consistency/
— consistency test frameworkcrates/typstyle-typlugin/
— typst plugin for embedded usagecrates/typstyle-wasm/
— wasm bindingstests/
— integration tests and fixturesdocs/
— documentation source (based on shiroa and written in typst)contrib/typstyle-embedded/
— typstyle as typst packageplayground/
— web-based interactive playground