Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider FFI bindings #2

Open
4 tasks
2bndy5 opened this issue Oct 5, 2024 · 0 comments
Open
4 tasks

consider FFI bindings #2

2bndy5 opened this issue Oct 5, 2024 · 0 comments

Comments

@2bndy5
Copy link
Member

2bndy5 commented Oct 5, 2024

It occurred to me that we could generate bindings using the same rust code base for

  • python (pyo3 for binding and maturin for packaging)
  • node.js (yarn for packaging with napi-rs for native bindings and packaging)
  • C (cbindgen for bindings and <your-choice-here> for packaging like conan or vcpkg or both and more)
  • Java (jni-rs for bindings and maven for packaging)

The python, node.js, and java bindings would only work for Linux (32 or 64 bit).

I haven't explored the C or Java ideas, just throwing that out there. I have been exploring the python and node ideas (in a different project).

To use C bindings in Arduino builds, we'd have to ship the library with generated header file(s) and pre-compiled binaries (*.a files compatible with any supported architectures -- mostly variations of arm-none-eabi for newer chips). But I'm not sure how feasible that would be, given complications like an RTOS or other multi-tasking implementations.

@2bndy5 2bndy5 mentioned this issue Oct 8, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant