omni icon indicating copy to clipboard operation
omni copied to clipboard

Export to C and C++

Open vitreo12 opened this issue 3 years ago • 3 comments

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

vitreo12 avatar Sep 30 '20 13:09 vitreo12

Some progress here:

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

vitreo12 avatar Sep 30 '20 15:09 vitreo12

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 avatar Sep 30 '20 15:09 vitreo12

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

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

vitreo12 avatar Oct 06 '20 15:10 vitreo12