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

Can I please, please, please, have C++ or at least C bindings? :) Or the desired way to call Rust from another runtime? I don't know any Rust.


Rust is just another programming language that’s quite similar to C++. The main difference is there’s like 4 types for String (some are references and some are owned) and methods for a struct go in a `impl StructName` block after the struct definition instead of inside it.

I don’t really know rust either but I’m currently writing some bindings to expose Rust libraries to NodeJS and not having too much trouble.

For rust -> c++ I googled one time and found this tool which Mozilla seems to use to call Rust from C++ in their web browser, maybe it would “just work”: https://github.com/mozilla/cbindgen?tab=readme-ov-file


Although the borrowing rules will make you feel is quite a different language than others.


> there’s like 4 types for String

Try 12.




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

Search: