Skip to content

Conversation

lewisfm
Copy link
Member

@lewisfm lewisfm commented May 21, 2025

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:

Before: vexTasksRun()
After: VexSdk.Tasks.run()

Before: vexSystemHighResTimeGet()
After: VexSdk.System.getHighResTime()

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 or Device), and then using the rest of the original name to name the method. If a method ends in the words Get, 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.

@lewisfm lewisfm added the enhancement New feature or request label May 21, 2025
@lewisfm
Copy link
Member Author

lewisfm commented May 21, 2025

Something I'd like to look at is using https://lib.rs/public-api to generate the API spec rather than relying on the hydrozoa runtime. That way all of the documentation from vex-sdk could be included for "free"!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant