1.5 KiB
1.5 KiB
CONTRIBUTIONS
Scope
This crate uses a two-layer workflow:
- Upstream source of truth: KiCad proto files in the
kicadsubmodule. - Published crate input: checked-in generated Rust in
src/proto/generated/.
Consumers should not need protoc or submodules.
When To Regenerate Protos
Regenerate when:
- KiCad API
.protochanged upstream. - You bump the
kicadsubmodule commit. - You need newly added/changed proto messages/enums/services.
Do not regenerate when:
- You only change handwritten Rust API/client code.
- You only add docs/tests unrelated to proto schema.
- You only refactor internals without schema updates.
Maintainer Regen Flow
git submodule update --init --recursive
./scripts/regenerate-protos.sh
This updates:
src/proto/generated/*.rssrc/kicad_api_version.rs
Commit Prefix Convention
Use this commit prefix when committing generated proto refresh output:
chore(proto-gen): ...
Examples:
chore(proto-gen): refresh bindings from KiCad rev-b5121435chore(proto-gen): regenerate after submodule update
Use normal conventional commit types for handwritten changes (feat, fix, refactor, test, etc.).
Suggested PR Structure
Prefer splitting into two commits:
chore(proto-gen): ...(generated output only)- Handwritten API/client updates (
feat|fix|refactor|test|docs)
This keeps review diff clean.
Pre-PR Checks
Run before opening/updating PR:
cargo fmt --all --check
cargo test
cargo check --all-features
cargo package