First of all, thanks for contributing to Takumi.
This guide covers local setup, development flow, testing/build commands, fixtures, and changesets.
- Report bugs with the Bug Report template.
- Propose enhancements with the Feature Request template.
- Ask usage questions via the Question template.
- Improve docs, examples, tests, and fixture coverage.
- Rust
1.89+ - Bun (latest)
bun installThis installs all workspace dependencies and sets up lefthook.
- Create a feature branch.
- Make your changes.
- Run formatting and tests for affected packages.
- Update generated fixtures if rendering output changed.
- Add a changeset for user-facing package/crate changes.
- Open a PR.
cargo fmt --all
bun run lintUse auto-fix when needed:
bun run lint:fixRun all Rust tests:
CARGO_PROFILE_TEST_STRIP=debuginfo cargo test -qRun workspace package tests (pick what you changed):
(cd takumi-helpers && bun test --silent)
(cd takumi-napi-core && bun test --silent)
(cd takumi-wasm && bun test --silent)
(cd takumi-image-response && bun test --silent)
(cd takumi-template && bun test --silent)To match CI quality gates for Rust changes, also run:
cargo clippy --all-targets --all-features -- -D warnings
cargo macheteRun build only for packages you touched:
bun --filter ./takumi-helpers run build
bun --filter ./takumi-napi-core run build:debug
bun --filter ./takumi-wasm run build:debug
bun --filter ./takumi-image-response run buildNotes:
takumi-napi-corerelease build needs target-specific setup; for local validation,build:debugis usually enough.takumi-wasmbuild requireswasm-pack.
Takumi fixture tests write snapshots under takumi/tests/fixtures-generated.
When you change rendering/layout behavior:
- Update or add fixture tests in
takumi/tests/fixtures/*.rs. - Register new fixture modules in
takumi/tests/fixtures.rsif you added a new file. - Run:
CARGO_PROFILE_TEST_STRIP=debuginfo cargo test -q- Review updated files in
takumi/tests/fixtures-generated. - Include intentional fixture updates in your PR.
CI will fail if generated files change unexpectedly.
For any user-facing change in published packages/crates, add a changeset:
bunx changesetSelect affected packages and choose patch / minor / major.
Changesets are stored in .changeset/*.md.
takumi/README.md is checked in CI with cargo rdme --check.
If Rust doc comments or crate-facing examples changed, regenerate:
cd takumi
cargo rdmeThen commit the updated takumi/README.md.
Release/version commands are handled by maintainers/CI via Changesets:
bun run versionbun run release
You usually do not need to run these in feature PRs.
- Code is formatted (
cargo fmt --all, Biome lint passes) - Relevant tests pass locally
- Scope is focused (one logical change per PR when possible)
- Fixture updates are intentional and reviewed
- Changeset added (if user-facing)
- Generated files that CI checks are committed
- Docs updated where needed
By participating, you agree to the Code of Conduct.