11 ms·
As much as I use Rust personally and for some of my own pet projects, for serious HTTP services and introducing it into a new developer team, I'm afraid that is
by rvz 7y ago
As much as I use Rust personally and for some of my own pet projects, for serious HTTP services and introducing it into a new developer team, I'm afraid that isn't feasible for my requirements. I'm put off with the immaturity of the crates ecosystem and the costs it will bring. Most of the crates are not even 1.0 including Rocket and that also requires a nightly build which isn't good enough for my requirements. (I only use stable Rust).
As a language it is mature, but the crates ecosystem is of lesser quality, especially for applications like HTTP servers. I've already overcome its learning curve, but the devs who swear by other languages that pay them well may not be so forgiving.
- timClicks 7y agoOne thing I've always wondered about this "not even 1.0" mentality is, why is a version number so significant? Sure it's an easy proxy, but it's not perfect. That number could be arbitrarily changed tomorrow and the maturity of the project hasn't necessarily changed.
- setr 7y agoMost versions don't mean much on their face -- every project has a different definition and way of versioning (usually undefined and fairly arbitrary, or based on client feature requirement and need-to-deploy). But 1.0 is special -- pretty much everyone agrees on its meaning: it's ready for others to use it, and I'm willing to stand by it. Sub-1.0 is also special, and generally agreed upon -- no one should consider this production-ready, and I'm not ready to defend it.
- tracker1 7y agoTo me sub-1.0 means you can't rely on even point releases being non-breaking changes, more than the suitability for production use... though that difference sees some overlap. Using node as much as I have, I've gotten used to updating dependencies fairly often and spending maybe a day a month on keeping things updated and smooth. I also tend to dig into nested dependencies and my bundle sizes (more on the front end).
- sullyj3 7y agoI mean, they could be, theoretically, but generally authors try to make the number a good reflection of the project's status.
- novocaine 7y agoYep, and async support is causing a shakeout of the existing ecosystem too - could take years before the dust settles. It'd be so nice if a major vendor picked up the language and built an ecosystem on it :)
- correct_horse 7y agoI totally agree that Rocket requiring nightly is a deal-breaker for production. I suspect the author picked Rocket because it feels more beginner friendly than alternatives. Actix-web is in 2.0. The original author stepped away recently, but it has quite the community behind it. If readers are curious why Rocket requires nightly, it has to do with the macros (that resemble Java annotations/python decorators). Specifically Rust wants all its macros to be hygienic - they shouldn't be able to (for example) create variables that clobber user-defined variables. Rust has multiple types of macros, but the type used by Rocket, procedural macros, don't have this hygienic property yet. For context, procedural macros operate on TokenStreams, whereas "normal macros" (declarative macros) operate on AST nodes. See the issue https://github.com/SergioBenitez/Rocket/issues/19 https://github.com/SergioBenitez/Rocket/issues/19
- golergka 7y ago> Actix-web is in 2.0. What's the situation with use of unsafe now? Although toxicity that was shown by the community was obviously uncalled for, I was very put off by the original author's stance on the issue and am wary of using it in production.
- libria 7y agoDon't know current situation, here's from a couple months ago, from a maintainer (not the original author): > Performance remains the key reason for the unsafe blocks. As per the safety dance charter, changing std Rust so as to eliminate the need for unsafe seems like the best course of action, but this work is beyond my comprehension. https://www.reddit.com/r/rust/comments/efk7n7/actixweb_v20_released/fc300rm/ https://www.reddit.com/r/rust/comments/efk7n7/actixweb_v20_r...
- steveklabnik 7y agoThe original author has handed it off to some of the other maintainers.
- correct_horse 7y agoAll issues dealing with undefined behavior (UB), segfaults and the like are currently closed. Actix-Web makes use of unsafe (as high-performance Rust usually does) so there could be some UB hiding.
- Matthias247 7y agoA question is what you would consider a more mature environment? E.g. C++ - a decades old programming language - does not contain widely accepted solutions for building web services. There are some libraries, but I mostly have not seen them being used outside of the companies that developed them. I think Rust already has a better stance there. Probably Go and node.js could be counted as good solutions, because their standard libraries cover the use-case very well. Or Java, thanks to a mature ecosystem around web services - even though the mainstream solutions (Servlet) focus on blocking IO.
- tracker1 7y agoI like node for really fast productivity, at the cost of a little potential stability... not the absolute best performance, but usually good enough. Up from there would imho be Go or C#, mostly because they're faster than node, but still very accessible, and really good support around them for web services. Certain workloads are still not great. I think Java is probably okay, I just personally don't care for it, apparently it's gotten better than when I last used it regularly over a decade ago. Rust is when you want balls out absolute performance in a language with newer, higher level features and constructs. The unsafe escape hatch is really there if/when you need it, but should not be the norm. The final executable size on rust is also impressive and will work very well in some constrained environments, or when you need better execution performance and more control than the others provide (outside of C/C++, D and a couple others). I've only built a couple smaller web apps with rust so far, but the output size is impressive. Being able to build to a bare container or with busybox if some in-container scripting is needed has been a great experience so far.
- pjmlp 7y agoServlets have supported asynchronous IO for quite a while now. Then there is the .NET stack as well. For distributed computing I hardly see a reason to pick Rust over Java or .NET eco-system. If we would be speaking about something like real time audio engine, then Rust would probably be the tool I would pick.
- pjmlp 7y agoFor distributed computing I also don't see a point using Rust versus the productivity of having a tracing GC strong typed languages with AOT/JIT toolchains. Most of those languages also have ways to stack allocate and off GC heap allocation, it is a matter of learning how to use those features, when and if it actually matters. 99% of the time it won't matter. Rust is great replacement for the kind of low level stuff like the C++ layer of Android, UWP composition engine, game engine graphics rendering and similar.
- jakearmitage 7y agoI don't understand either. I mean, it is fun and all, but for a serious project, why bother?