Skip to content

Installation

  • 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)
Terminal window
git clone https://github.com/vgerbot/plantuml.rs.git
cd plantuml.rs
cargo build

Tests are ported directly from the PlantUML Java reference:

Terminal window
cargo test --workspace

The TypeScript binding (@vgerbot/plantuml) compiles the Rust core to WASM and wraps it with a TypeScript API.

Terminal window
cd bindings/plantuml-ts
npm install
npm run build

This 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/.

Terminal window
cd bindings/plantuml-java
./gradlew build

This produces a JAR with JNI bindings exposing com.vgerbot.plantuml.PlantUml.

Terminal window
cargo clippy --workspace -- -D warnings