Kroki-rs is designed as a high-performance, modular rendering gateway. Its primary objective is to提供 exactly the same API as the original Kroki but with a modern, Rust-based engine that prioritizes speed and security.
Core Philosophical Tenets¶
Container Parity: Local development, CI, and production must use identical environments.
Lean Core: The core binary handles only coordination; rendering is delegated to optimized external tools.
Security First: External processes are isolated with strict timeouts and resource limits.
High-Level Flow¶
Key Components¶
Frontend: Axum-based HTTP server managing base64/deflate decoding.
Orchestrator: The
DiagramRegistryandCapabilitiessystem that discovers available tools at runtime.Backends:
Native Providers: Rust-based or C/Go binaries (Graphviz, D2).
Browser Providers: Headless Chromium instance managing JavaScript-heavy diagrams (Mermaid, BPMN).
Legacy Providers: Targeted JRE environments (Ditaa).
For more details on specific areas: