Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust can already talk C ABI so I think the dream is already reality.


Rust does not have native C++ interop.

C ABI is different to what clasp has done (native C++ interop). All widely used Common Lisp implementations have seamless C ABI interop through their FFIs / CFFI [1].

Clasp goes above and beyond that and natively interfaces with C++. LTO works with mixed Common Lisp and C++ code. Exception handling works as expected. You can mix Common Lisp and C++ stack frames. Correct me if I'm wrong but Rust does not have anything equivalent. The language that comes closest is D I think [2].

[1] https://common-lisp.net/project/cffi/

[2] https://www.youtube.com/watch?v=IkwaV6k6BmM


Rust can inline cpp code via rust-cpp crate. I've been playing with it several months ago and successfully used dear-imgui and other stuff in some of my rust tech.




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

Search: