21 ms·
Actix-web 1.0 – A small, pragmatic, and fast web framework for Rust
- jeffbarg 7y agoI'm sure it's been posted on HN before, but a great summary of other Rust libraries/frameworks for web development can be found here: https://www.arewewebyet.org/ https://www.arewewebyet.org/ The couple of times I've checked it's been fairly up to date and helpful for understanding what's out there.
- epaulson 7y agoI've found this link helpful too: https://github.com/flosse/rust-web-framework-comparison https://github.com/flosse/rust-web-framework-comparison
- Dowwie 7y agoI'm using actix-web in my work and am familiar with the project, so I'll try to summarize for everyone why this 1.0 release is so significant. This is a major milestone for the entire Rust community because we now have the first web framework written in stable Rust with an architecture that a credible author has deemed worthy of maintaining backwards compatibility for and a code base mature enough to have earned a 1.0 designation. This is real progress. The architecture of actix-web 1.0 is very different from that of 0.7. In many respects, it was a rewrite that began last Summer. The architecture is no longer based on an actor paradigm but rather one of Services, largely inspired by Eriksen et al's finagle work [1] adopted at Twitter. This service architecture is accessible through a library known as actix-net. Essentially, actix-web is a web-based actix-net server. If actix-web were bitcoin, actix-net would be its blockchain. Because of this, actix-net may be even more significant to the broader Rust community. The actor models can still be imported and used but no longer act as the default mechanisms driving the server. Regarding performance, according to the Tech Empower benchmarks that evaluate hundreds of web frameworks across all major languages, actix-web is top-ranking [2] and first in a few benches. The last benchmark represents a beta version of actix-web from last month and results may have slightly improved with 1.0. actix-web is very modular, allowing programmers to only use what is needed and no more. In terms of usability, actix-web 1.0 api is far easier to approach than 0.7. Running blocking calls against a database effortlessly flows within combinators now where as before one had to implement a lot of SyncActor boilerplate. Endpoint resource registration can now either be explicitly registered within an App instance or with a new set of proc macros, but routes still need to be registered manually. The new testing api is far easier to work with for unit or integration tests. A single person wrote two very different platforms in order to get to where it is today. I believe that future progress requires community participation at all levels. This is a great time for system programmers to take a deep dive and learn, from the network-level up, how to build a high-performing, flexible server. Write about it. Talk about it at meetups and conferences. Pay forward. Thanks, Nikolay, for your hard work and sacrifice. [1] https://monkey.org/~marius/funsrv.pdf https://monkey.org/~marius/funsrv.pdf [2] https://www.techempower.com/benchmarks/#section=test&runid=9f738614-61d5-4c04-a1a5-3778b2ac3003 https://www.techempower.com/benchmarks/#section=test&runid=9...
- jsty 7y agoFor someone who’d only toyed around with actix a while ago, this is an amazingly useful summary, thank you!
- raphaelj 7y agoRelated to web frameworks, what is the current status on ORM in the Rust ecosystem?
- bluejekyll 7y agoI think this is still the state-of-the-art in Rust: https://diesel.rs/ https://diesel.rs/
- the_duke 7y agoThere is only one option: diesel [1]. It is a powerful solution for correctness, as it is completely type-safe. It's also really fast since a lot of work is delegated to compile time. There are also plenty of drawbacks though: the extensive type system hacking can lead to very confusing compiler errors, it doesn't work well when you need to sometimes fall back to more dynamic db handling, and it doesn't handle large tables well. (very long compile times etc), and the documentation is quite sparse. It's a robust solution for greenfield projects where you can design the schema partially with diesel in mind, but I wouldn't recommend it for existing DBs or projects that you know will grow large (eg 100+ column tables etc). [1] https://github.com/diesel-rs/diesel https://github.com/diesel-rs/diesel
- inferiorhuman 7y agoit doesn't handle large tables well. (very long compile times etc) By large tables you mean a large number of columns, not a large number of rows, right?
- the_duke 7y agoCorrect.
- 7y ago
- iBelieve 7y agoGreat to see actix-web reach 1.0. I've played with Rocket in the past and liked it, but ended up choosing actix-web recently for a production project because I don't want to rely on a nightly compiler for a production project. I'm only using actix-web in a small portion of a larger Rust project, but so far my experience with it has been quite pleasant.
- Callmenorm 7y agoFirst time I even tried to use Rocket, I couldn't get there Hello World thing compiled. I honestly don't know if it was my error or a nightly compiler incompatibility and that sucked.
- MuffinFlavored 7y agouse actix_web::{web, App, HttpServer, Responder}; fn index(info: web::Path<(u32, String)>) -> impl Responder { format!("Hello {}! id:{}", info.1, info.0) } fn main() -> std::io::Result<()> { HttpServer::new( || App::new().service( web::resource("/{id}/{name}/index.html").to(index))) .bind("127.0.0.1:8080")? .run() } How do you know the HTTP method your path is called with?
- couchand 7y agoI haven't dug into the 1.0 API, but in the 0.7 line you specify an alternative handler signature that includes the HttpRequest object.
- timdorr 7y agoYou would route that resource to the appropriate handler: https://docs.rs/actix-web/1.0.0/actix_web/struct.Resource.html#method.route https://docs.rs/actix-web/1.0.0/actix_web/struct.Resource.ht...
- iBelieve 7y agoWhat couchand said still applies to 1.0. So this should work: use actix_web::{web, App, HttpServer, HttpRequest, Responder}; fn index(req: HttpRequest, info: web::Path<(u32, String)>) -> impl Responder { format!("[{}] Hello {}! id:{}", req.method(), info.1, info.0) }
- deleted 7y ago[deleted]
- Dowwie 7y agothat example isn't very good.. here's what the resource-registration for "/products" endpoint would look like (note the http method), where I've lazily omitted "/products" a level above because I wanted you just to see the http methods: web::resource("") .route(web::get().to_async(products::get_products)) .route(web::post().to_async(products::add_product))
- 7y ago
- yingw787 7y agoIs Rust a high-level language or a low-level language? Does rustlang's development prove you don't have to choose? My impression of Rust is that it's intended to replace C/C++, and that web frameworks are high-level libraries (whereas something like an HTTP library would be low-level). I guess you could write a web framework in C/C++ but I don't know of any that are popular or widely used off the top of my head. IIRC I think golang was meant to be low-level, but the community mostly came from high-level scripting languages that saw a visible boost in performance. Congratulations to the authors/contributors of actix-web on the 1.0 release!
- cyberprunes 7y agoGood question. I've been using Rust exclusively for a few months. I came from C#/python. typical GC'd application languages. With Rust I don't think you have to choose. Once you "get" the borrow checker and understand the ownership model Rust becomes very productive and feels like a high level language. There's a little noise in the syntax but what you get in return is so worth it. There are quite a bit of high level features to take advantage of that "compile away" with so called zero-cost abstractions. It's a legit low level language in the sense that you can write a legit OS. No GC, guaranteed memory safety. It's bonkers. I believe it is blurring the lines of what it means to be high/low level.
- untog 7y agoIn my experience it has elements of both, but stuff like managing lifetimes means that (IMO) it's more trouble than it's worth when you're creating a web backend. Any more established garbage collected language is absolutely fine. Unless it needs to, say, run in a very resource constrained environment, in which case it's a pretty interesting possibility.
- james-mcelwain 7y agoIt's certainly a less mature ecosystem, but once you get over the hump of understanding lifetimes, there's nothing preventing you from using lots of owned values and clone in a way that makes it really easy to ignore annoying lifetime problems. And, the benefit being if you ever need to get more performance out of a hot part of your code, you can always optimize to get that zero copy goodness.
- anurag 7y agoShow HN via comment: You can now deploy an Actix web app in production in just a few minutes. https://render.com/docs/deploy-actix-todo https://render.com/docs/deploy-actix-todo A Rust user testimonial: https://twitter.com/sebasporto/status/1136032748894736384 https://twitter.com/sebasporto/status/1136032748894736384
- christiansakai 7y agoI think this is my 2nd HN post in 5 years. I just want to shout out to Actix-Web team especially Nikolay. I was a Rust noob and still a Rust noob, asking stupid questions on Actix gitter, but the community helped me and give me suggestions a lot. Thank you! I am a really satisfied user of Rust and Actix Web! I hope I can retire my programming career just using Rust lol.
- kibwen 7y agoThe title somewhat buries the lede: actix-web has had its 1.0 release today. See also the thread at https://www.reddit.com/r/rust/comments/bwy99w/actixweb_10_released/ https://www.reddit.com/r/rust/comments/bwy99w/actixweb_10_re...
- Dowwie 7y agoThe title was a 1.0 release announcement but @dang changed it..
- dang 7y agoOne of us did. When a project hasn't had significant attention on HN yet, the project itself is the story, not the release. But we can squeeze a 1.0 back up there.
- timvisee 7y agoIt also contains a nice summary: http://reddit.com/r/rust/comments/bwy99w/actixweb_10_released/eq2t499 http://reddit.com/r/rust/comments/bwy99w/actixweb_10_release...
- pornel 7y agoActix-web in used in production at Cloudflare for the image resizing feature. It's been relatively easy to use and flexible enough to integrate with the rest of Cloudflare's stack. Feels vaguely similar to Node's express. Along with Rust it's a great fit for a service that needs to have high performance, tight memory usage with very low risk of leaks, integration with existing libraries, and a good security story.
- _bxg1 7y agoI've been experimenting with Iron/Router: https://github.com/iron/router https://github.com/iron/router Do you know how it compares?
- staticassertion 7y agoI don't think Iron is even supported anymore, but for one thing, last I checked, Iron was based on OS threads primarily whereas Actix has a (I believe) pluggable runtime, which supports async.
- _bxg1 7y agoAh really? That's surprising, as Iron seemed to be the go-to for what it does. I guess that's just a symptom of a nascent ecosystem.
- shepmaster 7y agoIron had a long quiet period, but it does have updates recently (a commit 12 days ago, for example).
- ac130kz 7y agoI chose Rocket.rs instead for my personal project, because most of the things are built-in in the library, so there was no need for me to spend hours figuring out how to put my own database pool or something.
- blakesmith 7y agoAgreed. Rocket has been an absolute pleasure to use. I'm looking forward to it being able to run on Rust stable at some point. Procedural macros abound!
- ac130kz 7y agoThey surely need to add security features like CORS/CSRF, which are already in the milestones. I adore the approach of the project to be easy, while maintaining the code quality.
- mevile 7y agoWorrying about security while using a nightly version of Rust seems counterintuitive.
- ac130kz 7y agoStabilizing is the primary goal of the stable (1.0) release as well, so there is no reason to argue.
- mevile 7y agoHow's that going? Last I checked some of that stabilizing depends on nightly rust macro issues that are years old with no signs of progress. When is your rocket.rs project shipping to real users in production? When that issue is resolved in five years?
- hombre_fatal 7y agoYou're comparing application-level security with Rust compiler nightly? Seems like a misunderstanding on your part. Would you also think authorization is counter-intuitive when you're using nightly?
- TrueDuality 7y agoActix-web is probably the most stable and feature complete Rust web-framework out there. I stopped using it in my personal projects after having multiple insulting and outright hostile experiences with the lead developer. I know this was a lot of work and I commend them for doing it, but I can't support a project with that kind of maintainer in the Rust community.
- mixedCase 7y agoThose are strong statements. Are any of these interactions public?
- IshKebab 7y agoLinks? So we don't get one side of the story...
- TrueDuality 7y agoI appreciate the desire to get both sides of the story and not taking a random strangers opinion, but I'm also sensitive to connecting the internet hate machine to anything personally tied to me so I'm going to pass on providing supporting evidence. Feel free to ignore my anecdote. I know it isn't much good without that connection, but it also isn't good to remain completely silent about bad behavior. Frankly I don't know how best to approach it either.
- somehnguy 7y agoIf you're going to take this stance its probably best you don't make comments like your original one in the future. By not wanting to provide any validation you're no better than someone posting completely made up accusations.
- rofrol 7y agoContrary, I had very good experience with lead developer and community.
- 7y ago
- fafhrd91 7y agohttps://www.techempower.com/benchmarks/#section=test&runid=5cc1a314-4e0c-4294-b8f1-cb607e0a5440&hw=ph&test=fortune https://www.techempower.com/benchmarks/#section=test&runid=5...
- the_mitsuhiko 7y agoWe (sentry.io) use actix-web (though not yet 1.0) for our symbolicator project. It’s the service that handles all of our native events for symbolication. That’s for minidump processing, dwarf/pdb based symbolication and much more. Couldn’t be happier with it. It’s super fast and stable and does it’s job really well. We run three machines for it and it didn’t manage to go past 10% CPU usage yet. Code is here for the curious: https://github.com/getsentry/symbolicator https://github.com/getsentry/symbolicator
- sergiomattei 7y agoSorry for the ignorance - what's symbolication? Sounds interesting and looking to learn.
- staticassertion 7y agoI assume it's taking stack traces/ core dumps from stripped binaries and adding back the symbols.
- the_mitsuhiko 7y agoYap, pretty much. It's used as part of the sentry event processing pipeline for C/C++/Objective-C/Rust etc. crashes.
- pxtail 7y agoI'm not sure if it's intended or not but every time I'm looking at this name I need to correct myself to not read/perceive it as ActiveX
- brunoqc 7y agoAnyone know why the super simple Middleware trait[1] was replaced by the more complex (and confusing at first) Transform and Service traits? Here's the simple middleware examples: 0.7: https://github.com/actix/examples/blob/0.7/middleware/src/simple.rs https://github.com/actix/examples/blob/0.7/middleware/src/si... 1.0: https://github.com/actix/examples/blob/master/middleware/src/simple.rs https://github.com/actix/examples/blob/master/middleware/src... Could a simple Middleware trait be added that would implement both new traits for us? [1]: actix_web::middleware::Middleware
- deleted 7y ago[deleted]
- anderspitman 7y agoI think Rust has a very bright future in web servers. I have one small service (using warp[0]) in production. The level of confidence I have once the dang thing compiles is quite comforting. [0] https://github.com/seanmonstar/warp https://github.com/seanmonstar/warp
- xixixao 7y agoExample reminds me: I love Rust, but every decent programming language in 2019 should have actual string interpolation (the "Hello ${expression}" kind). It's just so much nicer to read and write, and it doesn't come with any downsides besides some slight, local compiler complexity. (I have raised it on the forums already...)
- hombre_fatal 7y agoI prefer Rust's: format!("{a} {c} {b}", a="a", b='b', c=3) In real world projects, you will often transform at interpolation site which is better with Rust's format! syntax since it won't clutter the inline string. Not something I think is worth bike-shedding further.
- xixixao 7y agoOk, how about we agree both mine and your concerns are equivalently important? With real interpolations, you can do: a = "a" b = 'b' c = 3 "{a} {c} {b}" Your concern is addressed, with real interpolations, already.
- db48x 7y agoIt's a perfectly valid complaint, though I don't think it's all that critical. For debugging, the `dbg` macro is the way to go, so you can skip string interpolation for that entirely (see https://doc.rust-lang.org/std/macro.dbg.html https://doc.rust-lang.org/std/macro.dbg.html for details). And when you do want to use string interpolation, you can always grab a crate such as interpolate or any of the others. (https://crates.io/search?q=interpolate https://crates.io/search?q=interpolate). No need to change how the language works when you can download or build a library that suits you.
- oconnor663 7y ago> slight, local compiler complexity I think the biggest piece of added complexity would be that String would need to be a lang item, giving the compiler special knowledge about it. Currently Vec and String are plain library types, so conceptually this would be a pretty big change.
- cabalamat 7y agoIs the example program in Actix-web considered good programming style for that framework? The reason I ask is that the equivalent in Python/Flask might look like: @app.route("/<name>/<id>/index.html") def index(name, id): return form("Hello {}! id:{}", name, id) This has the advantages that: 1. the endpoint "/<name>/<id>/index.html" goes in the code right above the function that implements it. 2. the variables are called `name` and `id` and not `info.0` and `info.1` which is a less informative naming convention.
- killercup 7y agoI can't speak for the actix-web maintainers but I did find this in their examples: #[get("/resource1/{name}/index.html")] fn index(req: HttpRequest, name: web::Path<String>) -> String { println!("REQ: {:?}", req); format!("Hello: {}!\r\n", name) } see https://github.com/actix/actix-web/blob/e399e01a22b8a848ecbbc21c362878cd59a4342e/examples/basic.rs#L7-L11 https://github.com/actix/actix-web/blob/e399e01a22b8a848ecbb...
- lemmox 7y agoThat syntax refers to fields in a tuple. Path parameters can be deserialized into a type like this: [derive(Deserialize)] struct HelloWorldParams { id: String, name: String, } fn index(info: web::Path<HelloWorldParams>) -> impl Responder { format!("Hello {}! id:{}", info.name, info.id) }
- 7y ago
- tilulid 7y agoฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
- tilulid 7y agoฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
- bfrog 7y agoLook forward to perhaps replacing my iron based service with this if it really does solve some problems I have
- dustin1114 7y agoI wrote a relatively simple web application (https://github.com/DSpeckhals/bible.rs https://github.com/DSpeckhals/bible.rs) about 9 months ago with version 0.7. The initial code changes to migrate to 1.0 weren't that bad (https://github.com/DSpeckhals/bible.rs/commit/fbd7e8207023a0bf9ce7b51b0943c24f30a7a662 https://github.com/DSpeckhals/bible.rs/commit/fbd7e8207023a0...). The most substantial changes I made during the migration weren't necessary, but according to the author, are a little more idiomatic actix-web: moving from sync arbiter actors for Diesel connections to just using `web::block`. Both use a threadpool behind the scenes, but `web::block` is less verbose. I've been extremely satisfied with its performance and ergonomic abstractions over HTTP and async Rust that actix-web offers. And like others have mentioned, the author and other contributors provided me with some good, practical answers to a few questions I had.
- amelius 7y agoDoes this framework support the use of the same language on the client as on the server? Can I send actix messages between client and server?
- lacampbell 7y agoHow suitable is actix-web for serving static files? I'd love a programmable server for this, as opposed to dealing with nginx.
- SahAssar 7y agoIt seems fast enough for simple file serving, but if all you want is modify some of nginx's behavior I'd probably look to openresty or nginxcript instead. It's easy to underestimate how many edge cases that nginx (or similar mature web-servers) will handle for you and that you won't know about when rolling your own webserver.
- jupp0r 7y agoGood to see that it supports async handlers. I feel like many Rust web frameworks look nice on paper but are completely useless for many real-world applications because of synchronous request handling.
- soperj 7y agoJust wondering, does anyone know off hand if there's any support for this in PAAS's like Heroku & Openshift?
- deleted 7y ago[deleted]
- submeta 7y agoOff topic: Does it make sense (would it be useful) for a Python developer who uses Python for Data Analysis (Jupyter Notebooks, Pandas, Numpy), quick scripting, automating, scraping etc to look into Rust?
- chriswwweb 7y agoIs it just me? Every time I read headlines about this framework I misread it as active-x and it makes me feel uncomfortable ;)
- inlineint 7y agoNo one mentioned Riker https://github.com/riker-rs/riker https://github.com/riker-rs/riker, another actor framework for Rust. It would be interesting to hear comparison of both from those who used it.
- sbr464 7y agoDoes anyone have experience/feedback using Actix with the juniper graphql library? Especially with the newer 1.0 changes. https://github.com/graphql-rust/juniper https://github.com/graphql-rust/juniper
- Fiahil 7y agoI was trying to get actix-web working on arm (hosting a small rust API on a raspberry pi seemed exciting enough to get me rolling). However, compiling it was slightly too much resource-intensive and building ARM docker images on a Macbook Pro was not straightforward (at least not with a "scratch" base). I was a bit disappointed because I really wanted to use rust as a small-footprint app server :(