Enhanced Generator #94
Pinned
ondrej-fabry
announced in
Design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Table of Contents
💠 Enhanced Generator
The Enhanced Generator is a development around a new features aiming to make the generator more extendable and improving generated code.
Here is overview of areas relevant to this development:
Generator Extensions
Generator Extensions refers to custom generator plugins loaded from file. This feature will allow users to generate their own code along with the existing generated code bindings and enable new methods for developing and generating custom specialized VPP API clients.
Planned Tasks
This is quick overview of the planned tasks and their current status:
References
Documents
Pull Requests
Code
api/v0
pkg/wrappergen
pkg/templates
pkg
Details / Spec
🔹 Generator Plugin Extension (more...)
Generator Plugin Extension
Generator Plugin Extension refers to the plugins loaded from a binary file, which must be a compiled Go package containing
GenerateFile
function. This file is loaded usingplugin
package and executed after internal generator plugins (API, RPC..).🚧 TBD
🔹 Input Source (more...)
Input Source
Input Source refers to the source of the VPP API as input for the generator.
For the CLI front-end of the generator it's an option (flag)
--input=<INPUT>
. Using a single parameter to define the input this opens up possibility to to accept various types of sources which makes it very convenient and simple for the user.Depending on the value of
<INPUT>
we can determine the source used to resolve VPP API files:input=""
- is not set (default value)input=<API_DIR>
- is a path to directory withcore
andplugins
directoriesinput
input=<VPP_DIR>
- is a path to directory with VPP source code (cloned git repository)make json-api-files
build-root/install-vpp-native/vpp/share/vpp/api/
(relative toinput
)input=<VPP_REPO_REF>
- is a URL to a remote VPP repository / commitinput=<VPP_VERSION>
- is a VPP version / branch nameinput
🚧 TBD
Beta Was this translation helpful? Give feedback.
All reactions