Open bosley opened 1 year ago
Consider if we should have an ffi module that allows more than just primitive types to be mucked with.
I think extern-call
and how we handle primitives should stay around for basic integration, but something more encompassing should be done.
If not that, then we need to be able to dynamically make/remove ctypes
when we make structs and whatnot.
ffi support right now can do basic types. if we want structs, we will need a way to "define" the structs in such a way that we can generate an ffi representation of the struct, and maybe do some basic things like initing a pointer of the type, etc.
This is a cool way that some languages do this: https://github.com/rpav/c2ffi
We could use that, or we could come up with some.. other way. toml/json representation or something.