This crate contains an implementation of a safe, simple, and generic Mojom parser written in Rust.
This crate is still in extremely active development! We're still figuring out the final shape and how it will fit into the overall rust mojo bindings.
FOR_RELEASE: These comments indicate TODOs that should be addressed before we finalize the minimum viable product for the rust bindings. For example, fill this out more!
A key goal of this parser is to be agnostic to the actual Mojom files that it parses. Unlike the bindings for other languages, which generate specialized parsing code for each type in each Mojom file, this parser works for all of them (at the cost of performance).
This is achieved by representing the parser's inputs and outputs as miniature ASTs: rust enums that describe the possible types and values a Mojom file could describe. For each Mojom file, the bindings generator will be responsible for generating a corresponding rust type, and mapping it to/from the enums, but the generator will not have to write any parsing code itself.