A worry with the current implementation is the dependency of some parts of the run-time on Matreshka.
That library is impressive but a clear antipattern. Like, you need a pipe and you drag a whole chemical plant into your project...
When I build an example generated from a tiny .proto, GNAT compiles 15 of the 18 pb_support* files it needs, two google*, the generated stuff, plus... 360 (!) files from Matreshka, including what looks like a XML parser (!!), regexp things, JSON stuff (at different places), .ini files support, things that are heavily CPU and OS dependent, global strings for an application, etc.
If it is possible to add switches to protoc, an idea would be to have a "pure Ada" mode using only Ada.* packages.
The type generated for strings would be Unbounded_String (some people are happy with UTF-8) instead of Universal_String.
It would require a bit of remodeling of the run-time, with a protobuf/source/runtime/using_matreshka subdirectory and a protobuf/source/runtime/light for the other variant.
A worry with the current implementation is the dependency of some parts of the run-time on Matreshka.
That library is impressive but a clear antipattern. Like, you need a pipe and you drag a whole chemical plant into your project...
When I build an example generated from a tiny .proto, GNAT compiles 15 of the 18 pb_support* files it needs, two google*, the generated stuff, plus... 360 (!) files from Matreshka, including what looks like a XML parser (!!), regexp things, JSON stuff (at different places), .ini files support, things that are heavily CPU and OS dependent, global strings for an application, etc.
If it is possible to add switches to protoc, an idea would be to have a "pure Ada" mode using only Ada.* packages.
The type generated for strings would be Unbounded_String (some people are happy with UTF-8) instead of Universal_String.
It would require a bit of remodeling of the run-time, with a protobuf/source/runtime/using_matreshka subdirectory and a protobuf/source/runtime/light for the other variant.