by ThePhysicist · 11y ago · 0 comments
I wonder if this is an irrational fear though. Has anyone here implemented a large project with many external dependencies (DB, data serialization, interfacing with other programming languages etc.) in Rust? If so, what were your learnings and would you do it again?
I find that the discussion about whether a programming language is "good" or not always focuses on the core features of that language and less on the actual system of support libraries that are available for it and that make it actually useful in a real-world setting.
p.s. I love rust.
p.s.2 . It is completely logical and most of agree rust is in early adopt stage.
Although I find Rust very appealing I still see C++ as the better option, mostly
because I fear that Rust would lack good suppport libraries (e.g. for talking to
DBs, generating/parsing data formats such as JSON or for generating cryprographic
hashes) and that I would end up implementing many of those myself. As of today,
many Rust wrapper libraries (e.g. for BerkeleyDB) seem to be written by a single
author, which makes me wonder about their stability and maturity even more.
Rust is in its very beginning[1]. Only time can tell if it will have a rich set of support libraries that are stable and mature.It has one big advantage over C and C++ in this regard.It has a central repository for all the support libraries.
I always found it difficult to assess the stability and maturity of libraries for C or C++ found on the internet. Of course there are the standards, like libpng or zlib, and you know they must be good because so many projects use them. For more exotic tasks you are on your own. With a central repository, you can at least estimate the popularity of a certain library. crates.io shows a download count for example. Also many other popular languages have one
Java Maven
Perl CPAN
TeX CTAN
PHP PECL, PEAR
Python PyPI
Ruby RubyGems
R CRAN
Node.js npm
Lua LuaRocks
Haskell Hackage
[1] I know that Graydon started it over 5 years ago, but from user standpoint Rust is more a child of 2015.For Java there are commercial curated Maven repositories and I'm not aware of anything like that for C/C++. So Cargo can be an enabler for Rust in big corp.
For PHP PEAR is dead. Packagist is the de facto central repository for packages.
It's not by any means a conservative, "safe" choice (in the business sense); you'd be choosing an early-stage language, with everything that implies. But I think it's a reasonable choice for a new project starting today. And the community around it is incredible.
Young ecosystems: lots of opportunity, but 'opportunity' also means pain for those on the other side of the chasm...
https://doc.rust-lang.org/book/ffi.html
https://www.reddit.com/r/rust/comments/3axeu8/whats_the_stor...
I guess the answer is that it depends on what libraries you'll need.
Hopefully more people share their stacks on http://www.stackbus.com/ (FYI, I build it) so that it help others to decide better.
You don't need everything be pure Rust. Just use C libraries to fill in the gaps.