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

Export to C and C++ #122

Open
vitreo12 opened this issue Sep 30, 2020 · 3 comments
Open

Export to C and C++ #122

vitreo12 opened this issue Sep 30, 2020 · 3 comments

Comments

@vitreo12
Copy link
Owner

Export the C generated source as a single header, and define all entry points as inline functions.

@vitreo12
Copy link
Owner Author

Some progress here:

https://github.com/vitreo12/omni/tree/compileToC

@vitreo12
Copy link
Owner Author

vitreo12 commented Sep 30, 2020

The main issue would be how to deal with omni_alloc? It would require a conditional (when defined(omni_export_c)) rewrite to deal with user submitting the void* function pointers to alloc functions on a per call basis... Too much work for now

@vitreo12 vitreo12 changed the title Export to C Export to C and C++ Oct 6, 2020
@vitreo12
Copy link
Owner Author

vitreo12 commented Oct 6, 2020

The C version will be a cleaned up version of the Nim C export.

The C++ version will wrap everything in a class.

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