Problem is, it looks from a glance like it's just C, not C++/Obj-C/COM. Which isn't very useful these days :(
Conversation
Replying to
C would be really helpful for FFI bindings to C libraries.
Just an anecdote, but that's like 99% of what I care about in terms of what I personally develop. I've used bindgen's C++ support like once.
3
8
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
I desire the opposite of that: something built into rustc which does what bindgen does natively as part of a Cargo-based workflow
1
1
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
I would say that a good >90% of the -sys crates in my personal stack are C bindings.
Granted most of the apps I work on are services.
1
2
Some examples of what I mean:
* android.googlesource.com/platform/exter
* android.googlesource.com/platform/exter
These are external C libraries, but it's all brought into the standard AOSP system and can be referred to and called from C, C++, Rust or Java with standard cross-compilation, debugging, etc.
1
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
1
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.
Yes that sounds great except I want it as part of a cargo workflow with no external dependencies besides cargo and rustc
1
I don't think rustc and cargo intend to provide that though. I'm not familiar with bazelbuild.github.io/rules_rust/ but it's basically the same thing outside AOSP. cargo-raze converts Cargo to Bazel and then it fits into the overall Bazel system with other languages like C.
1
Show replies

