Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Contributing to Kroki-rs

Thank you for your interest in contributing to Kroki-rs! We welcome contributions from everyone.

Getting Started

  1. Fork the repository on GitHub.

  2. Clone your fork locally:

    git clone https://github.com/your-username/kroki-rs.git
    cd kroki-rs
  3. Create a new branch for your feature or fix:

    git checkout -b feature/my-awesome-feature

Development Workflow

Prerequisites

Unified Workflow Targets

To ensure consistency across local iteration and CI, we use the professional dflow CLI wrapper. Please use these instead of raw cargo commands whenever possible.

CommandRoleWhen to use
./dflow setupEnvironment InitAfter cloning or when tools are missing.
./dflow developLocal VerificationRapid iteration on your native OS (macOS). (alias: dev)
./dflow ci-verifyCI VerificationBefore pushing, verify in the CI container (same env as GHA). (alias: repro)
./dflow teardownDisk CleanupPurge all native and container caches. (alias: clean)

Concrete Examples:

./dflow develop -p -v       # Full native verification with clean cache and verbose logs
./dflow ci-verify --test load   # Containerized CI verification with load tests
./dflow develop -d           # Local iteration with debug tracing enabled

Pull Request Process

Pull Request Process

  1. Sync with Release Branch: Before starting or submitting, ensure your feature branch is up-to-date with its parent rel/vX.X.X.

    git fetch origin rel/vX.X.X && git merge origin/rel/vX.X.X
  2. Iterate & Verify: Use ./dflow develop for native OS checks and ./dflow ci-verify for container parity (~45s warm rebuild).

  3. Final Freshness Check: Before merging your feature into the release branch (e.g., rel/vX.X.X), run a fresh check:

    DEBUG_LOG=false make all
  4. Submit PR: Open your PR from feat/your-feature to rel/vX.X.X. Once the release branch is ready, a final PR will be raised from rel/vX.X.X to main.

Environmental Roles

EnvironmentOS / RuntimeWhat runsRole
Local DevmacOS (native)./dflow developRapid iteration
Local CI verificationmacOS/Linux + container./dflow ci-verifyVerify in same env as GHA before pushing
GitHub CIGHA runner + containerci-build.yml (container jobs)Source of truth

Adding a New Diagram Provider

  1. Create a new module in src/diagrams/providers/.

  2. Implement the DiagramProvider trait.

  3. Register the provider in src/diagrams/registry.rs.

  4. Add a test case/verification step.

  5. Update the documentation.

Code of Conduct

Please be respectful and kind to others. Harassment or abusive behavior will not be tolerated.