On Sun, Nov 22, 2015 at 8:02 PM, murali wrote:
By now the Go packages are compiled into an intermediate representation and
stored in an ad hoc binary format, as far as I can tell.
Is it possible and practical to employ existing binary format like
FlatBuffers for Go's package archives?

My original idea was to implement a marshal/unmarshal library for the .a
files as a building block for writing other tools in the future.
Then I thought, what if the data structures can be stored in the archives
can be formatted with existing serialization library?

What do you think?
The Go archive format is the same as that recognized by the Unix ar
tool, although Go uses it slightly differently. The objects stored in
the Go archive format are, as you say, ad hoc. I wouldn't call it an
intermediate representation, though; it contains fully compiled
instructions with relocations, like other object file formats.

We might change that in the future (https://golang.org/issue/11123).
If we did, we might use a serialization format. But it seems to me we
would use one already supported by the Go standard library, like json
or gob. I don't see a clear reason to use something new.


You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupgolang-dev @
postedNov 23, '15 at 4:12a
activeNov 23, '15 at 5:55a



site design / logo © 2022 Grokbase