3 ms·
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.
by loxias 2y ago
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.
- jitl 2y agoRust 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 https://github.com/mozilla/cbindgen?tab=readme-ov-file
- sebastianconcpt 2y agoAlthough the borrowing rules will make you feel is quite a different language than others.
- ptdorf 2y ago> there’s like 4 types for String Try 12.