3 ms·
I have a big C++ legacy code, and it gives me a lot of headhaches. I'm using Rust in some small projects and it's great, no problens with null pointers :). I th
by rlnunes 10y ago
I have a big C++ legacy code, and it gives me a lot of headhaches. I'm using Rust in some small projects and it's great, no problens with null pointers :).
I think a great feature of Rust is that it is easy to use inside C/C++ projects, so u can upgrade your current legacy code without rewrite it :)
- xjia 10y agoDo you mean C/C++ and Rust interop? Maybe link them together to form the final executable binary? Can you share more experience on how do you do that?
- bluejekyll 10y agoRust produces standard linkable system libraries. You can produce dynamic libraries or static libraries on all supported platforms. For actual examples of using Rust with other languages through these libraries this site is great: http://jakegoulding.com/rust-ffi-omnibus/ http://jakegoulding.com/rust-ffi-omnibus/
- computerphage 10y agoMore information about platform support can be found here: https://doc.rust-lang.org/book/getting-started.html https://doc.rust-lang.org/book/getting-started.html
- carols10cents 10y agoNot the OP, but I did a talk on an incremental rewrite of a C library to Rust [1]. Rust has good FFI capabilities with C and other languages through that [2]. [1]- https://github.com/carols10cents/rust-out-your-c-talk https://github.com/carols10cents/rust-out-your-c-talk [2] - http://jakegoulding.com/rust-ffi-omnibus/ http://jakegoulding.com/rust-ffi-omnibus/
- rlnunes 10y agolinking a static lib with rust and linking with the final executable. other users posted the links I used :)