I would like to repost 0b_0101_001_1010 from reddit thread, as unfortunately author does not have an account here. I fully agree with this well articulated opinion and think it’s worth to discuss it more widely:

During the last year I have gotten the impression that Rust is only targeting a niche of a niche, that is, the tiny amount of developers writing high-performance Http servers.

Most developers doing web/http stuff are using Javascript, Go, Ruby, Python, Java, … and they do not care enough about performance to use Rust. How do I know? Because those that do are already using C and C++, and that’s a tiny fraction of the group above.

For this web/http-dev audience that doesn’t care that much about performance Rust is not better than the languages they are already using, so why would they use it? Even though they might like Rust, they do not need it.

Then why aren’t we attracting C and C++ developers? Well, we are. But we are only attracting a tiny fraction of them because to them Rust is that nice language that only has libraries for doing web-related stuff (servo/http) and most C and C++ developers don’t do anything web related. Those that do, use a different language for that, or use C and C++ because they need to do something more than just web (like numerics, graphics, data-science, guis…).

In my opinion, the goal for 2017: “Rust should be a good language for writing high-performance async servers” was a mistake. That’s a tiny audience, and a very high-level goal for a very low-level language.

The goal for 2018 should be “C developers should be able to use Rust for all the task that they use C for”, and the goals for 2019-202N should be the same for C++.

That is, in 2018, Rust should run everywhere where C can run. We need at least a GCC backend, and way better would be to have a C89-backend. We need alloca, inline assembly, SIMD, CUDA, etc. Cargo should be able to easily compile C code, so that people can port C libraries from Makefiles and autoconf to Cargo, and cargo should be able to easily spit Makefiles.

From 2019-202N on we should have as the primary goal to allow C++ developers to use Rust. Right now, one cannot integrate Rust into a C++ code-base, at all. Using C-FFI works if you are writing C++ and Rust code like its 1989. If you are writing modern generic heavy C++ code using a Rust library of any quality feels like using an antiquated C library. If there is no reason for your library to be generic, then that’s great, but the best Rust libraries are generic heavy (e.g. think serde). The image that C++ devs have of Rust is important, and that image depends on how does Rust look from the C++ side. Also Rust does not have “abstraction parity” with C++: no variadics, function traits, ATCs, type-level consts, virtual enums, … Procedural macros look like the C preprocessor when compared against the C++2a compile-time typed AST manipulation in clang.

Also, people who use C++ even for web/http applications typically use C++ for something else. Whatever that something else is (data-science, scientific computing, geometry, games, finance, CAD, banking systems, control software for robots, machine learning…), number crunching is probably a big part of it, and honestly, C++ number crunching libraries (Eigen3, GLM, CGAL, VTK, PCL, ITK, VDB, …) have better APIs than the Rust alternatives even though we sell Rust as a “high-level”-looking language. We should be ashamed of how horrible ndarray code looks like when compared with Eigen3 code (and IMO, whoever mentions typenum is part of the problem). Why should any C++ dev switch to Rust when one cannot write in Rust even the lowest level of the stack without constantly feeling that C++ would allow writing much nicer code? And well then we have GUIs. C++ interfaces perfectly with native GUIs in all platforms, and on top of that it has Qt.

These C++ libraries are not perfect, but Rust alternatives are worse, and for any C++ dev to seriously consider using or integrating Rust, either interoperability needs to get way better, or Rust needs to offer way better libraries than C++ (because if they are just equally good, why bother?). You might argue that if these libraries are important to me then I should go on and write them, which is a valid opinion to have if it would be possible to write them at all in Rust (most of them use type-level consts to make their APIs nicer).

This was a long rant but IMO, we should focus on attracting C developers (this is low hanging fruit), and C++ developers, because these developers are actually interested in Rust, and they do need it. But for them to be able to use it, it is not enough for Rust to be equally better, Rust must be much better than what they are actually using. For some reason, we are actually telling them that they can switch to Rust, but IMO if you are doing any kind of number crunching in C++ there aren’t probably many reasons to switch to Rust. Fearless concurrency is useless if you cannot do any work because the library you need to do the work doesn’t exist or is a pain to use.