Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm sorry (genuinely, especially in light of your self-aware end comment), but I don't believe that this is a well-informed comment. Yes, there are Rust crates that are written as bindings to C++ libraries, where there isn't drop-in available Rust code available to use, or either a de-facto standard API and well-tested C++ codebase allow for this. Examples of this can be found in relatively niche, code-heavy areas like machine learning, with OpenCV and Tensorflow libraries available in Rust just calling to existing system installation.

However, I think it's disingenuous to claim that either "a majority of the rust libraries" use bindings like that, or to suggest that Firefox is the primary project worth watching that uses Rust. As mentioned elsewhere in this thread, Rust articles and code examples fairly routinely show up here on HN. It's surely not complete, and any programming language or framework is an exercise in trade-offs, but from hacking on bare-metal or microcontrollers[1] to web GUIs with interactive physical simulations[2], Rust-only or Rust component code is showing up in a number of domains and production environments[3]. A lot of this is really seems to stem from a safety-by-overall-design rather than safety-by-specific-implementation approach, which seems to resonate well with both experienced developers and newcomers alike.

[1] https://rust-embedded.github.io/book/

[2] https://nphysics.org/demo_all_examples3/

[3] https://news.ycombinator.com/item?id=22238335

Edited for spelling/grammar



I really like the development happening in rust to write some core libraries, but given most hardware still use C for development, I doubt rust will be able to escape the fact that it will have to be a wrapper around C with rust api layer on top of it.

Firefox which is the reason for origin of rust, cannot yet be completely written in rust and will continue to be dependent on C++ for sometime. I feel like Python, Rust might become more popular once enough hardware and core libraries move away from C/C++ to Rust. It is still a decade or two away.


Firefox isn’t dependent on C++ because Rust is insufficient, it’s because porting (IIRC) fifteen MILLION lines of code just doesn’t happen overnight, and isn’t a direct focus.


That’s precisely the issue, until and unless enough libraries are created in Rust with little to no dependency on C/C++, it won’t be a significant language but will just be something similar to Haskell may be bit larger.

So I still feel Rust needs another decade or two to be able to claim as C/C++ replacement, not at present.

This is exactly the problem Swift faced to replace Objective-c, in Apple eco-system where everything controlled by Apple. Rust has much bigger hill to climb to be really useful systems programming language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: