Commit Graph

43 Commits

Author SHA1 Message Date
charles d9186e697e Fix merge conflicts and generated code logic in generator.rs 2026-05-07 20:53:08 -07:00
charles 13625a48c9 Add support for Protobuf oneof fields in generator
Generate `which_<oneof>` methods and corresponding enums to handle
oneof fields in generated messages. Also add `has_<field>` helper
methods for all fields.
2026-05-07 20:15:16 -07:00
charles a20eed7223 Add support for protobuf map fields
Update the generator to detect map fields and use MapFieldIterator.
Implement MapFieldIterator in the runtime to handle key-value pair
extraction and add write_map_entry to ProtoBuilder. Add tests to
verify that map-bearing messages generate and compile correctly.
2026-05-07 20:15:08 -07:00
charles 8395195ac1 Clean tests 2026-05-07 17:59:39 -07:00
charles f76a020b1e Add test to verify generated code builds
Create a temporary Cargo project to ensure that the Rust code generated from
`test_types.desc` compiles successfully.
2026-05-06 16:21:21 -07:00
charles 80f3aa49ba Fix bug in codegen 2026-05-06 16:03:56 -07:00
charles 847c6cdc66 Merge branch 'check-conformance' 2026-05-04 23:38:50 -07:00
charles e5c2479985 Document unsupported Proto3 features 2026-05-04 23:38:11 -07:00
charles d21ff797b0 Add read-update-write benchmark
Update the README with a new benchmark group and performance results.
Include new data files and update the Rust benchmark implementation.
Regenerate UPB bindings and fix a data path in the C benchmark runner.
2026-05-04 23:37:36 -07:00
charles a0c2747583 Add read-update-write benchmarks
Add benchmarks for parsing, updating, and serializing in Rust and C.
Update the fork instructions in AGENTS.md.
2026-05-04 23:13:53 -07:00
charles 40e342f221 Document Protobuf spec validation 2026-05-04 23:12:20 -07:00
charles ea68537f0b Refactor crate into multiple subcrates 2026-05-04 22:48:26 -07:00
charles d71d96c15f Use roto::RawFieldIterator in generated code 2026-05-04 20:28:08 -07:00
charles 3e5544d3d8 Allow unused imports in generated code 2026-05-04 20:19:40 -07:00
charles 04ef952a58 Add Builder::with for updating messages
Allow creating a new message based on an existing one, overriding
specific fields while copying the remaining original fields.
2026-05-04 20:11:54 -07:00
charles 05e4c275bb Add raw field iterator and with builder method
- Implement RawFieldIterator and ProtoAccessor::raw_fields that yield
  (field_number, raw_bytes) pairs for each field
- Extend Builder with per-field _written flags and add a with()
  method to copy unseen fields from a source message
- Add ProtoBuilder::write_raw to copy pre-encoded field bytes
- Add tests for raw-field iteration, verbatim copying, and with()
2026-05-04 19:03:56 -07:00
charles 6821bd1cca Add performance results section to README 2026-05-04 14:53:49 -07:00
charles 4a6a09cff1 Add benchmark 2026-05-04 14:40:11 -07:00
charles b03ec9eba9 fix: tests 2026-05-04 13:46:05 -07:00
charles ca81a2d010 Update README 2026-05-04 13:45:18 -07:00
charles 858c6968d4 Clean warnings 2026-05-04 11:14:57 -07:00
charles 7fbea70860 Migrate to using generated code 2026-05-04 10:45:38 -07:00
charles a4fa72c819 Include generated code 2026-05-04 09:23:51 -07:00
charles 22c4e17e9f Fix code generation 2026-05-04 09:23:01 -07:00
charles 87b111faf5 Code compiles, but tests fail 2026-05-04 09:04:28 -07:00
charles d9be36726f Implement protobuf enum and message generation
Add `write_enum` and `write_message` to generate Rust enums and structs
from protobuf descriptors. Update the generator tests to support the
updated `generate_rust_code` signature.
2026-05-04 08:59:23 -07:00
charles 74d975788b add: files 2026-05-03 21:03:55 -07:00
charles 20e4fb909b Generate modules to make easy importing 2026-05-03 20:44:07 -07:00
charles a2a5c12235 Escape 'type' keyword in generated Rust code
Use raw identifiers for fields named "type" to avoid conflicts with the
Rust keyword. Fix field number indexing in tests.
2026-05-03 14:00:20 -07:00
charles b73cbb3dbc Merge branch 'add-generated-markers' and resolve conflicts in src/generator.rs 2026-05-03 13:45:25 -07:00
charles 38367227ed Cache field offsets in generated accessors
Update the generator to store field offsets and ranges within the
generated accessor structs, avoiding repeated buffer scans.
2026-05-03 13:32:39 -07:00
charles 79f2cbf640 Update README, monkey patch generator.rs 2026-05-03 13:31:39 -07:00
charles 31476485cf Add integration test 2026-05-03 13:06:11 -07:00
charles 405a00c7ab Incremental progress 2026-05-03 12:57:14 -07:00
charles 642a78e4e7 Add some tests 2026-05-02 23:01:06 -07:00
charles 8ae8c5dfd3 First pass at plugin gen 2026-05-02 22:48:03 -07:00
charles 33449d00c8 Add EnumDescriptorProto and clap dependency 2026-05-02 22:12:45 -07:00
charles 3454af9604 Add protobuf descriptor and compiler plugin support
Implement accessors and builders for FileDescriptorSet,
CodeGeneratorRequest, CodeGeneratorResponse, and related types.
2026-05-02 21:24:07 -07:00
charles 82577edeac Copy official plugin.proto and deps 2026-05-02 17:57:23 -07:00
charles 021f81b9fe Update README.md 2026-05-02 17:54:56 -07:00
charles 4ee2dcb948 Add more thorough test cases 2026-05-02 17:52:04 -07:00
charles 6912ff37d3 First pass at runtime 2026-04-30 23:13:24 -07:00
charles ae567e5798 Add README 2026-04-30 22:01:41 -07:00