google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
67 stars 20 forks source link

Convert `ir_data` to a `dataclass` #149

Open EricRahm opened 4 weeks ago

EricRahm commented 4 weeks ago

This converts ir_data over to a dataclasses.dataclass and adds various FieldSpec helpers to support that conversion. The builder, reader, IrDataSerializer, copy, and update stubs are fully implemented to support dataclasses as well.

This change results in a 38% speedup against a 75KB test file.

Fixes #118.

EricRahm commented 4 weeks ago

@robrussell This is the big change we've been working towards!

EricRahm commented 3 days ago

@robrussell Thanks for the review! I'll dig into this today