Hacker News new | past | comments | ask | show | jobs | submit login

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.




deno_bindgen exists which can be used to do this from Rust.

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


I see, thanks for the heads up.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: