Conversation

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
Cargo could provide comparable UX but I think it just doesn't have the ambition / goal to provide this. You would get better error messages from rustc being aware of it, but I don't think it's essential. I can't really see it either happening though.
1
Show replies