5 ms·
I don't think I've seen anyone claiming that Rust is a perfect language without flaws. Heck I'd hold up all of the huge strides that have been made in errors, u
by vvanders 8y ago
I don't think I've seen anyone claiming that Rust is a perfect language without flaws. Heck I'd hold up all of the huge strides that have been made in errors, usability and constant feedback as a counter example of that.
You see a lot of people holding up Rust precisely because we've been there for the last 5/10/15/20 years. The day I don't have to write a makefile or build yet another CMakeLists.txt is the day I rejoice.
What Rust offers is another option in the native, non-GC'd language space. A space that has very few languages and even fewer yet that are shipped at scale. Rusts inclusion w/ FF means that the have to address the robustness, security, performance and usability of the language to a degree that you don't commonly see.
Having just blown 4+ hours today dealing with the linker on a mixed C/C++ project I don't really miss a lot of the baggage that comes with native development these days. Rust gives you the option of dropping down to that level while still preserving a set of sane, opinionated defaults that are pretty well thought out.
- kxyvr 8y agoSince you made a mention of CMake, does Rust really provide an alternative for building multilanguage projects? When I went to look for examples on how this is managed, it seemed horrendous. For example, some projects manage this by writing a program to download, unzip, and build the source: https://github.com/elrnv/ipopt-rs/blob/master/ipopt-sys/build.rs https://github.com/elrnv/ipopt-rs/blob/master/ipopt-sys/buil... Others just assume that the libraries are there, but they still require a program to compile them: https://github.com/cmr/openblas-src/blob/master/build.rs https://github.com/cmr/openblas-src/blob/master/build.rs As long as all of the dependencies are in Rust, things appear nice. At the same time, unless I'm missing something, it seems like crates manages multilanguage projects poorly. Though I have some major gripes with CMake, I've managed multilanguage projects mostly well. Is there a sane way outside of CMake to manage a multilanguage project with Rust?
- OtterCoder 8y agoNot so much with Rust in the driver's seat. Cargo, Rust's primary toolchain, only has weak support for pre/post build scripts. It's solely concerned with Rust's own dependencies and compilation. In the couple of projects where I've added Rust to a larger project, it's always been bash or node that coordinates the overall build.
- oever 8y agoYou can call a compiler for C/C++ from build.rs. That tooling is currently not very advanced. As far as I know there is no crate to write compile recipes that as easily as a Makefile or CMakeLists.txt. When I tried this in build.rs, I had to check modification times myself. There is an opening for a ninja-type crate in Rust.
- blakesmith 8y agoCheck out Bazel: http://bazel.build http://bazel.build. I've been using it a lot to build several multi lingual projects that include Java, C++, embedded C, Javascript, CSS, and even Docker images. There are community Rust rules, that I haven't tried yet, but am planning on investigating soon: https://github.com/bazelbuild/rules_rust https://github.com/bazelbuild/rules_rust
- digitaLandscape 8y agoIs there a non-Google alternative for those of us who don’t want our builds spied on?
- AceJohnny2 8y agoIndeed. Rust is the only new contender in the field of systems programming, where C++ has to contend with decades of negative mindshare (C++11: "I've changed! I promise!"), and D, well, never really took off (because it started off in the early Internet era as a commercial compiler?).
- lasagnaphil 8y agoThere is also Zig, which seems nice as a C replacement but still highly unstable, and Jai, which is also a nice C replacement but currently has no publicly available compiler yet... So for the time Rust is the only new systems programming language (And please don’t say Go/Nim is a contender, they’re good languages in their own ways but having a garbage collector disqualifies it fron that categorization)
- geezerjay 8y ago> Jai, which is also a nice C replacement but currently has no publicly available compiler yet... If there is no compiler then there is no programming language.
- vmchale 8y ago> You see a lot of people holding up Rust precisely because we've been there for the last 5/10/15/20 years. The day I don't have to write a makefile or build yet another CMakeLists.txt is the day I rejoice. Ironically, cargo is one of the areas the rust ecosystem falls down completely. Not to mention, there's no ABI... > What Rust offers is another option in the native, non-GC'd language space. True, and while this is great in principle for embedded development, not using a GC is overrated. > Rust gives you the option of dropping down to that level Well, if you're not dealing with the linker, you're not at "that level"