go-capnp
go-capnp copied to clipboard
schemas: remove global registry
Having a global registry of schemas creates problems with vendored copies of go-capnproto2, even if the application doesn't use reflection. I'd like to change APIs that require reflection data to require it as a parameter. I'm thinking that each .capnp.go
should have a function that returns all the reflection data and bundles up the transitive dependencies. This approach ought to lend itself to dead-code stripping, which would make binary sizes smaller.