TypeSpec binary parser library and emitter
A TypeSpec library and emitter that lets developers describe binary file layouts in TypeSpec, specifying where and what each piece of data in the file is, and generates the parser and typed interfaces so a binary stream can be dropped into a parse function to get a typed object back.
What it addresses
Hand-parsing binary file formats requires lots of trial and error; the author wanted a descriptor language that generates the parser and interfaces so a binary stream can be parsed into a typed object.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
TypeSpec binary parser library and emitter
A TypeSpec library and emitter that lets developers describe binary file layouts in TypeSpec, specifying where and what each piece of data in the file is, and generates the parser and typed interfaces so a binary stream can be dropped into a parse function to get a typed object back.
Problem: Hand-parsing binary file formats requires lots of trial and error; the author wanted a descriptor language that generates the parser and interfaces so a binary stream can be parsed into a typed object.
Posted by @Dathuil · Original source ↗
Source text · @Dathuil · · Source ↗
What I would have prefered is some sort of descriptor language that lets me generate the parser and interfaces for everything so I just drop the binary stream into a parse function and get my typed object back. I'm working on creating a TypeSpec Library and Emitter for this so that you can describe everything in Typespec as to where and what is in the file and have it parse.