vitreo12 / omni

DSL for low-level audio programming.
https://vitreo12.github.io/omni/
MIT License
188 stars 6 forks source link

Export to C and C++ #122

Open vitreo12 opened 4 years ago

vitreo12 commented 4 years ago

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

vitreo12 commented 4 years ago

Some progress here:

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

vitreo12 commented 4 years ago

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 commented 4 years ago

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

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