Hi there,
For a while there has been some interest in making the API language more
explicit.
This is a rewrite of the vppapigen generator with support for services {} (like
grpc), enums, output plugins, better error checking.
Currently supported is C/JSON output plugins.It also removes the need for compiling native tools from the build process. Implemented in Python PLY, and currently runs about two orders of magnitude slower than the C version. (150ms to process a 30KB input file versus 2ms for the C version). The change is in: https://gerrit.fd.io/r/#/c/8781/ The compiler generates the same output as before. As this has quite a few stake holders I will hold off for a week or so awaiting comments before asking for it to be published. Commit comments: VPPAPIGEN: vppapigen replacement in Python PLY. This is a version of the VPP API generator in Python PLY. It supports the existing language, and has a plugin architecture for generators. Currently C and JSON are supported. Changes: - vl_api_version changed to option version = "major.minor.patch" - enum support - Better error checking and reporting - import support (removed the C pre-processor) - services (tying request/reply together), support for events. - plugin architecture for output modules (C (server side) and JSON supported now). Version: option version = "1.0.0"; Enum: enum colours { RED, BLUE = 50, }; define foo { vl_api_colours_t colours; }; Services: service { rpc foo returns foo_reply; rpc foo_dump returns stream foo_details; rpc want_stats returns want_stats_reply events ip4_counters, ip6_counters; }; Future planned features: - unions - bool, text - array support (including length) - proto3 output plugin - Refactor C/C++ generator as a plugin - Refactor Java generator as a plugin Cheers, Ole
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ vpp-dev mailing list [email protected] https://lists.fd.io/mailman/listinfo/vpp-dev
