|
|
|
|
|
by pjmlp
823 days ago
|
|
This is one of the approaches for FFI taken by other runtimes, however it has the issue that without binding generators (jextract, P/Invoke code generators, ctypesgen), the type declarations are a pain to write. Thus something like this would need a similar tool. |
|
I have written a partial solution for C, though it is bespoke for my libclang bindings, and a very rough one for C++. Both of these require more work to really be ready-to-use tools however.
[1] libclang C binding generator: https://github.com/aapoalas/libclang_deno/blob/main/build/bu...
[2] C++ binding generator: https://github.com/aapoalas/txx