feat: autogenerate bindings in build script #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an attempt to integrate the functionality of @amarcolini's external Python script directly into the build process to effectively remove all maintenance costs of vex-sdk.
These changes keep the bindings up-to-date by automatically re-generating them when the Hydrozoa runtime changes.
Included in the generator, VEX SDK methods are given simplified Java-inspired names which are chosen by attempting to parse their original forms:
The mapping from C-style name to Hydrozoa-style name starts by removing the
vex
prefix, turning the next word into an inner class name (e.g.System
orDevice
), and then using the rest of the original name to name the method. If a method ends in the wordsGet
,Set
, or another common "action verb," that is moved to the front.I am experimenting with usage of
org.teavm.interop.Address
for simpler FFI generation in this PR.