Hacker News new | ask | show | jobs
by petters 2784 days ago
Was using Rust in a Cmake project smooth?

Can a C++ project with Cmake start using Rust incrementally?

1 comments

Yeah, it works quite well. In my case, I used ‘ExternalProject_Add’ to run the builds through Cargo, then setup a static lib target with that as a dependency, linking to the files built by Cargo and a few system libs it expects. From there you can treat it like any target in Cmake, and it just works(tm).

Edited for clarity

That's great! This sounds like a path into Rust for me.