3 ms·
I'd be super happy if there was a focus on partial migrations to Rust. I've last tried a while back (2 years?), and it's absolutely possible, but the build sys
by eqvinox 6y ago
I'd be super happy if there was a focus on partial migrations to Rust. I've last tried a while back (2 years?), and it's absolutely possible, but the build systems banging their heads into each other was a major hurdle. For a large C/C++ codebase, I guess avoiding Cargo altogether might be the best way to go - the more so the smaller the pieces being migrated are.
- jcranmer 6y agoI've seen the pain you've mentioned. The way you can make it work is to basically make a single Rust crate that does nothing but link all of your Rust dependencies into a single library that you can then add to your build system: https://searchfox.org/mozilla-central/source/toolkit/library/rust/shared/Cargo.toml https://searchfox.org/mozilla-central/source/toolkit/library...
- eqvinox 6y agoThanks, I shall try that next time I give it a shot!
- SAI_Peregrinus 6y agoI recently started a project to demonstrate cross-language building between Rust and C. Started with CMake using the Corrosion module, I plan to add examples for more styles (CMake with ExternalProject at least, probably also Bazel, Meson, Makefiles, and others). Very WIP at the moment, I haven't even tested it on Windows and don't have a Mac. I don't have that much time to dedicate to this though.