The current blocker for rustc self-hosting is writing out and reading
the crate metadata. Marijn wrote up a proposal outlining the data that
needs to be encoded on the wiki, which looks good to me. The code that
inserts the data blob into and reads the data blob from the files is
working, modulo the "Franken-LLVM" issue. What's missing is the actual
encoding format.
AFAICT the design criteria are that the format needs to be seekable and
extensible. Ideally it should be compact and simple as well.
I've floated the idea of using EBML [1], which is a dead simple format
used by Matroska (including WebM). It's more or less just "tag ID + size
+ contents", where the contents can recursively include other tags. I
had good results with this format for my Android profiler. When I was
writing that I did a quick survey of the options and went with EBML over
BSON, because BSON, while more mainstream, is not at all compact (it's
usually as large as the corresponding JSON, its only advantage being
that it's seekable and has more data types than JSON).
Any opinions? I started sketching out a tiny EBML library for Rust, but
I thought I'd ask the mailing list before going further.
Patrick
[1]: http://matroska.org/technical/specs/rfc/index.html
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev