Installation
Installation
Section titled “Installation”Prerequisites
Section titled “Prerequisites”- Rust toolchain (edition 2021,
resolver = "2") — install via rustup - Node.js 18+ — required for the TypeScript binding
- Java 17+ — required only for the Java binding
- wasm-pack — required only to rebuild the WASM module (
cargo install wasm-pack)
Build the core library
Section titled “Build the core library”git clone https://github.com/vgerbot/plantuml.rs.gitcd plantuml.rscargo buildRun the tests
Section titled “Run the tests”Tests are ported directly from the PlantUML Java reference:
cargo test --workspaceBuild the TypeScript binding
Section titled “Build the TypeScript binding”The TypeScript binding (@vgerbot/plantuml) compiles the Rust core to WASM and wraps it with a TypeScript API.
cd bindings/plantuml-tsnpm installnpm run buildThis runs wasm-pack for both web and nodejs targets, then compiles the TypeScript wrapper. The output lands in bindings/plantuml-ts/dist/ and bindings/plantuml-ts/wasm/.
Build the Java binding
Section titled “Build the Java binding”cd bindings/plantuml-java./gradlew buildThis produces a JAR with JNI bindings exposing com.vgerbot.plantuml.PlantUml.
cargo clippy --workspace -- -D warnings- Quick Start — render your first diagram