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

Feature Request: C Wrapper/Callable from C #132

Open
jockm opened this issue Jun 17, 2024 · 1 comment
Open

Feature Request: C Wrapper/Callable from C #132

jockm opened this issue Jun 17, 2024 · 1 comment

Comments

@jockm
Copy link

jockm commented Jun 17, 2024

Forgive me for not knowing the right terminology as my knowledge of rust is shallow at the moment, but it would be great to see a wrapper, or whatever so that Polka is callable from C as a library or such.

Do you have any plans for this?

@koute
Copy link
Owner

koute commented Aug 13, 2024

Eventually, yes, but probably not in the short term. (Unless someone wants to contribute; PRs are welcome.)

With the new API that I've committed yesterday it should be relatively straightforward to create a C API. You'd essentially expose an opaque wrapper around the RawInstance and Module types, and then just expose functions for most of the methods defined there, plus some extra auxiliary functions to construct a ProgramBlob.

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

2 participants