feat(kaitai): Phase 0 — fix compile blockers and wire runtime#39
Merged
Perseus merged 1 commit intofeat/kaitai-rust-scaffoldfrom Mar 2, 2026
Merged
Conversation
Phase 0 of Kaitai LMO Adapter (PKO-137): - Rename Rust keyword conflicts in pko_lmo.ksy: type→obj_type, box→bbox/aabb - Regenerate pko_lmo.rs from fixed .ksy (6,187 lines) - Fix generated code: *_io.size() deref, i32/u32 type mismatches, u32::MAX literal - Add kaitai runtime as git dep (kaitai-io/kaitai_struct_rust_runtime@9959613) - Wire kaitai_gen module into lib.rs via #[path] - All 375 tests pass, cargo check/clippy clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR successfully resolves Rust keyword conflicts in the Kaitai Struct schema and wires the official runtime, making Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[formats/pko_lmo.ksy<br/>Schema Definition] -->|kaitai-struct-compiler| B[gen/kaitai/pko_lmo.rs<br/>Generated Parser]
B -->|Manual Fixes| C[Fixed Generated Code<br/>- Remove *_io.size dereferences<br/>- Fix u32/i32 comparisons<br/>- Rename type→obj_type<br/>- Rename box→bbox/aabb]
D[Cargo.toml] -->|Add Dependency| E[kaitai runtime v0.11.0<br/>@9959613]
C --> F[lib.rs]
E --> F
F -->|Module Declaration| G[kaitai_gen::pko_lmo<br/>With Lint Suppressions]
G --> H[cargo check ✓<br/>cargo clippy ✓<br/>375 tests pass ✓]
Last reviewed commit: bed3fef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.ksy(type→obj_type,box→bbox)kaitai-io/kaitai_struct_rust_runtimegit dependency (official runtime)pko_lmo.rsand fix 4 categories of generated code bugscargo checkpasses cleanlyLinear
Resolves PKO-137
Test plan
cargo checkpasses🤖 Generated with Claude Code