Conversation

Replying to and
Android is using the usual shared toolchain, build system and build sandbox for heavily integrating Rust into the OS. It's not using Cargo and it's heavily using multiple forms of interoperability with C++ due to that being the prior basis for most stuff.
2
1
Replying to and
There's something to be said for not having to deal with the hellish traditional C++ and Java build systems at all. Rust, Kotlin and legacy Java / C++ code handled together by the same declarative build system without make, cmake, configure scripts, ant, gradle, etc. is nice.
2
1
So you end up building the C, C++, Rust, Java, Kotlin, etc. with the same incremental ninja builds without really thinking about it as separate projects. Can refer to dependencies in the other languages and it just fits together well. Unlike my experience at all elsewhere.
1
1
Replying to and
I think it's pretty nice just referring to a C module from a Rust project and calling functions from it with it built and linked together for you without dealing with the details since it generates the bindings for you as part of cross-compilation to the appropriate target.
1
Replying to and
It feels like you have this when using Rust in AOSP because you never need to use bindgen. You depend on the library, call the C code and when you modify the C code, the ABI has changed for the Rust code built with it too. So rustc doesn't do it, but it feels like it's doing it.
1
Show replies