5 ms·
Announcing Actix Web v4.0
- woile 5y agoThanks a lot for this! actix-web is an amazing framework so far. I've started with the book zero2prod in rust, and using some type driven designed, rust's errors handling, actix-web's extractors and web::data feels like super good ergonomics. I do feel like the docs could be expanded a bit more, I got stuck when trying to write a middleware for example. Congrats for the release!
- capableweb 5y agoThat's great to finally hear! I started learning Rust recently and usually start learning new languages by building different kinds of Hacker News clients with the language. This time I focused on a offline-first desktop HN client, that fetches items periodically and allows the user to browse it in a desktop app built with Tauri. While developing this, I started writing a API with Actix Web at the same time, so the same service could be used directly in the browser, not just with the desktop app. So I found Actix Web to be the most supported. However, I jumped into the RC versions (in order to use tokio >v1 which I was already using for other things, and you can't mix versions), while most human-written documentation (website, Stack Overflow, forums and such) were written for the pre-4 version. So I'm glad to see it finally released, and can't wait for all the documentation to/web resources to be properly updated as well so I can learn more about Actix Web. Great work on creating a nice library folks! :)
- lambda_dn 5y ago"Actix was found by third parties abusing unsafe and when they were auditing most libraries found for Rust on the internet. When the unsafe code was audited it was found that on misuse, it can lead to serious vulnerabilities. So they opened a bunch of issues and added a lot of patches and PR’s in GitHub." Good luck though
- gilrain 5y agoHey bud, you are being really aggressive and disagreeable in here. At this point, I think everyone is aware that you, personally, would not recommend Rust or Actix. Loud and clear my dude.
- lambda_dn 5y ago
- nextaccountic 5y agoThey have since fixed those issues in actix 3.0
- lambda_dn 5y agoEvidence of that? Or is the whole software world to believe the words of nextaccountic?
- rackjack 5y agoWhy don't you provide evidence of extant misused `unsafe` first? Or is the whole software world to believe the words of lambda_dn?
- maccam94 5y agohttps://www.reddit.com/r/rust/comments/iqq8k9/announcing_actixweb_v30 https://www.reddit.com/r/rust/comments/iqq8k9/announcing_act... https://www.reddit.com/r/rust/comments/t1bim5/announcing_actix_web_v40/hyfb8wh https://www.reddit.com/r/rust/comments/t1bim5/announcing_act...
- kibwen 5y agoThis is an easy mistake to make, but actix-web isn't actix, it's a web framework that uses actix. And while actix once had a controversial reputation regarding unsafety, the project has reversed its stance in the years since that quote was relevant and now appears to treat soundness violations with seriousness.
- cellover 5y agoIs this project public? I'd love to have a look at it. Thank you!
- capableweb 5y agoIsh, it's still pre-alpha :) Running it over at https://ditzes.com https://ditzes.com, source code at https://codeberg.org/ditzes/ditzes https://codeberg.org/ditzes/ditzes Waiting for reaching alpha status before I post as a Show HN, want to have the desktop builds publishable before then at least too.
- Dowwie 5y agoFor those who have been considering Rust for your next web dev project, it is a great time to give it a try. Actix Web is a mature offering with ecosystem, community and learning materials, including a few major book publications in the pipeline.
- outside1234 5y agoAlso check out Axum, which honestly in my hands has the best ergonomics, and is built on top of the Tokio ecosystem. https://github.com/tokio-rs/axum https://github.com/tokio-rs/axum
- msoad 5y agoI always wondered if the safety and correctness that Rust offers is needed in a CRUD application? Do you think it pays off to work in the extremely strict system where you can't just cast to any and move on with your product features?
- woile 5y agoI think there are quite some macros that accelerate a CRUD creation app, for example, take a look at sqlx with ormx: https://github.com/NyxCode/ormx https://github.com/NyxCode/ormx
- tasn 5y agoThis is something I thought about a lot before switching to Rust at Svix[0]. What I came to realize though, that there are no "casts to any and move on", but rather there are silencing real bugs and praying you won't hit them. Almost every time I've ever tried to silence the type checker (in any other language) it resulted in a bug. Does it make you slower? Definitely at times, but it's mostly OK, and the code is pretty damn clean. You can check out our repo to see how it looks[1]. Edit: we don't use Actix, we use Axum, but the same holds for Actix too. [0] https://www.svix.com https://www.svix.com [1] https://github.com/svix/svix-webhooks https://github.com/svix/svix-webhooks
- Thaxll 5y ago
- kevincox 5y agoI've been using the pre-releases for my web service and it has been rock-solid. I'm happy that it finally has been marked stable. That will definitely help a bit with dll-hell that you often see for unstable releases.
- dang 5y agoRelated: Actix Web 3.0 - https://news.ycombinator.com/item?id=24514212 https://news.ycombinator.com/item?id=24514212 - Sept 2020 (108 comments) ExpressJS vs. Actix-Web: performance and running cost comparison - https://news.ycombinator.com/item?id=22456796 https://news.ycombinator.com/item?id=22456796 - March 2020 (53 comments) Actix – Actor Framework for Rust - https://news.ycombinator.com/item?id=22316491 https://news.ycombinator.com/item?id=22316491 - Feb 2020 (126 comments) Actix Web – Project Future - https://news.ycombinator.com/item?id=22099335 https://news.ycombinator.com/item?id=22099335 - Jan 2020 (38 comments) Rust framework actix and actix-web are dead - https://news.ycombinator.com/item?id=22096616 https://news.ycombinator.com/item?id=22096616 - Jan 2020 (35 comments) A Sad Day for Rust - https://news.ycombinator.com/item?id=22075076 https://news.ycombinator.com/item?id=22075076 - Jan 2020 (991 comments) Actix project postmortem - https://news.ycombinator.com/item?id=22073908 https://news.ycombinator.com/item?id=22073908 - Jan 2020 (397 comments) Actix Web: Optimization Amongst Optimizations - https://news.ycombinator.com/item?id=21962195 https://news.ycombinator.com/item?id=21962195 - Jan 2020 (14 comments) Actix-web 1.0 – A small, pragmatic, and fast web framework for Rust - https://news.ycombinator.com/item?id=20104619 https://news.ycombinator.com/item?id=20104619 - June 2019 (147 comments) Actix: a small, pragmatic, and fast Rust web framework - https://news.ycombinator.com/item?id=17190705 https://news.ycombinator.com/item?id=17190705 - May 2018 (123 comments)
- Valodim 5y agoAnyone got experience using actix web vs rocket? My rough impression is that actix is focused more on performance, rocket on stability and developer ergonomics?
- vladvasiliu 5y agoTo me, rocket seems much more "batteries included" than actix, which requires you to look around or build your own things if you want to build a bigger app. I'm thinking about authentication, templates, etc. I'm not really a web dev, though, so I may be wrong, or missing something.
- Klonoar 5y agoMy usual reminder that I have a Django-ish template for actix-web that I maintain: https://github.com/secretkeysio/jelly-actix-web-starter https://github.com/secretkeysio/jelly-actix-web-starter Now that actix-web 4.0 is out I should be able to finally resolve one of the open issues/PRs, which I was waiting on 4.0 for.
- darkr 5y agoRocket development has stalled for a while now due to the project owner stepping back as he has some real world stuff to deal with.
- echelon 5y agoActix is amazing! I'm using actix-web for https://fakeyou.com https://fakeyou.com and their websocket support for upcoming features. It's incredibly productive and resilient. I've built proxies and other stuff with it too, and it performs swimmingly.
- masterof0 5y agoDo you have in your road map, to add Trump's voice?, I will use your app everyday, lol
- rizzaxc 5y agoIs it the time to consider Actix (or any other rust web framework) for production? I'm planning for a rather ambitious project, but not sure if I should choose rust (the new shiny thing) or stick to good ol Go (while I do have some issues with it)
- dralley 5y agoPlenty of companies (including Microsoft IIRC) are using Actix in production. At this point it's not that shiny and new. Actix is the most mature of the Rust web frameworks. Axum is new but very promising. Rocket is popular but development is stalled at the moment since the main developer has been going through some rough times.
- lambda_dn 5y agoEvidence that Microsoft use Actix? Im sure if they did you would have posted a link.
- JSGdev 5y agoMy company currently runs Actix-web in production and is happy. Good tooling, fast, low resource costs, well-supported.
- lambda_dn 5y ago
- deutschewelle 5y agoCan we get some benchmarks to get a rough ball park estimate of performance/$ ? Is it say possible to run a production quality server that can handle hundreds of thousands of concurrent users on digital ocean lets say? It's not clear to me as a "buyer" what its selling points are and what makes it uniquely different from other Rust frameworks
- nicoburns 5y agoThe truth is there isn’t an awful lot of difference between the artist frameworks. Actix-web was one of the first though, so the reason to choose it over others would be that it’s a bit more built out feature wise.
- ibraheemdev 5y agoActix-Web actually differentiates itself from most other Rust servers in that it runs multiple per-thread runtimes as opposed to a single work-stealing runtime. This probably doesn't matter to most, but if you really care about latency, it might be a factor to consider.
- Xevi 5y agoThere are lots of benchmarks of Actix if you search for it. It's also one of the top frameworks in the TechEmpower benchmarks.
- capableweb 5y agoWhat libraries like this could you really extract "performance/$" from? Sounds like a mostly financial metric. It's so situational that you cannot say outright exactly how much something cost in different scenarios. Doing so requires strict metrics about other things at the same time, and could only be done as an analysis of what happened, not what will happen in the future. Subtle bugs and things like just using a different data structure would impact the performance, down to the tiniest detail. If you're so adamant to see metrics, you could use TechEmpower's framework tests, latest one placing 5th Actix in the "Composite score" (https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=composite https://www.techempower.com/benchmarks/#section=data-r20&hw=...), as a result of being pretty high up in the specific benchmarks. But even with that information, it doesn't mean it'll be the 5th fastest framework when you use it. I guess the point is: do you own benchmarks for the specific areas where you need it to be fast, calculate what your costs would be for hosting it, and you'll have your "performance/$".
- liquid153 5y agoActiveX
- spixy 5y agoThat is what I read first too.
- lambda_dn 5y agoWith the latest C++ features (lambdas, co routines, smart pointers) it seems Rust is a gratuitous effort to solve a problem that is already solved. Seriously look at modern C++ it is very easy to develop high performance software in a modern language.
- tele_ski 5y agoI've used both very extensively and while I like the direction c++ is headed, I know a lot of people don't, I couldn't disagree with you more. Writing reasonably fast rust that doesn't crash is far easier than writing any kind of c++ that doesn't crash. Copies are a real problem in rust though, they are definitely difficult to avoid without jumping through hoops sometimes but I haven't hit any yet that are a real world show stopper with good upfront design and architecture. C++ just has too much baggage and footguns to make it truly productive on larger teams osit
- Kelteseth 5y ago> Seriously look at modern C++ it is very easy to develop high performance software in a modern language. I'm a full time c++ developer that does Rust as a hobby, and I'm asking myself if we are talking about the same language. C++ is a clusterfuck of obscure features, 1 million different build systems and hacks upon hacks for even simple things like include guards, forward declaration of classes to not completely kill your build times and _many_ more daily struggles that are simply none existent in Rust.
- lambda_dn 5y agoNearly 100 open issues on Github. It's not something you want to use in production.
- richbell 5y ago> Nearly 100 open issues on Github. It's not something you want to use in production. The number of open issues isn't a meaningful measure of the maturity or reliability of a project.
- deleted 5y ago[deleted]
- Macha 5y agoClearly nobody ever manages to use this Go thing with over 700: https://github.com/golang/go/issues https://github.com/golang/go/issues. Or .net, over 5000 issues for the compiler alone: https://github.com/dotnet/roslyn https://github.com/dotnet/roslyn. I'd guess stuff like Java, glibc would be similar if they used github
- UltraViolence 5y agoWhy would I choose Actix over ASP.NET MVC with which I'm already familiar and works fast and reliably and doesn't require me to learn another language? There's no need for a deterministic memory managed language in web applications. GC languages such as Java and C# work just fine there.
- Macha 5y agoWhat of people that don't use C#? What of teams with libraries already built in Rust? Also I've been on teams building web apps in Java that were more complicated than just CRUD. We had one where the GC behaviour of Java was decidedly suboptimal as the applications would for for minute long GCs due to large in memory caches
- UltraViolence 5y agoThere are very few developers that aren't fluent in C# or Java or another C derived language. The learning curve for Rust is pretty steep, since the deterministic memory management requires new concepts to be mastered whereas with C#/Java you can just create objects left and right without having to worry about when to clean them up. C# and Java have vastly more libraries available to them than Rust. Having sub-optimal behavior is usually a sign of poor design IMHO. But it's difficult for me to pass judgement without seeing the application code. Also, I doubt that Rust would be of any help in this case.