Considering what would happen if Rust came bundled with a C/C++ (cross)-compiler. It'd certainly be convenient, but having the Rust project be on the hook for C++ compiler bugs sounds pretty awful...
Conversation
Replying to
What I really want is this, but for Rust
Quote Tweet
Replying to @bascule @rikarends and 2 others
D recently added an "ImportC" feature like this.
The implementation was only 4klocs, which is pretty cool:
github.com/dlang/dmd/pull
1
5
Replying to
Problem is, it looks from a glance like it's just C, not C++/Obj-C/COM. Which isn't very useful these days :(
1
4
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.
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
Show replies

