Build Blazing Fast Backends with Rust & Actix Web

Ғылым және технология

Create a blazing-fast backend with the help of Rust and Actix web! Mastering Rust can be hard and especially understanding the `move` keyword in Rust can be hard as well. That's why I highly recommend watching this video after this one: • Smarter Programming in...
📝 Description
Ready to level up your backend development? Learn how to build insanely fast and efficient web services using the power of Rust and Actix Web. This video guides you through the basics, so you can create high-performance APIs in no time including path parameters, POST and GET endpoints, and some smaller concurrency features!
⏳ Timestamps:
00:00 - Introduction
00:22 - Simple HTTP Server
05:47 - Adding Path Parameters
07:04 - Add Database and POST endpoint
15:24 - Change the GET endpoint
17:53 - Outro
👋 Hey there!
If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering. Plus, I love using Emojis and paper-based animations (so have a look for that, if you want to find my videos).
📨 Support and Connect!
Buy me a coffee: www.buymeacoffee.com/florianw...
Become a member: www.youtube.com/@flowoelki/me...
Discord: / discord
Instagram: / flowydev
LinkedIn: / florian-woelki
TikTok: / florianwoelki
GitHub: github.com/FlorianWoelki
#rust #actixweb #backenddevelopment

Пікірлер: 49

  • @alexjohnson-bassworship3150
    @alexjohnson-bassworship31503 ай бұрын

    This is hands down the best beginner Actix API video on KZread! Great work!! Loved this.

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    Glad it was helpful! Thank you :)

  • @rip4real437
    @rip4real43711 күн бұрын

    Amazing video man, very concise and thorough... I'm still learning Rust and you made this as clear as it can be. you are actually really underrated! Please make more videos like this... subbed

  • @FloWoelki

    @FloWoelki

    9 күн бұрын

    I appreciate that! Thank you!

  • @Lition98
    @Lition982 ай бұрын

    Very simple and concise. Thank you

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    Glad it was helpful!

  • @DerickRobinsonPlata
    @DerickRobinsonPlata2 ай бұрын

    Thanks for the great video, keep up the work!

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    thank you for the amazing feedback!

  • @Mr.BinarySniper
    @Mr.BinarySniper3 ай бұрын

    Wow.. Very Elegant video.. clear presentation. love your video style.. go ahead sir.. we will become popular.

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    Thank you. Appreciate your feedback! :)

  • @willbroadnyirenda7342
    @willbroadnyirenda73423 ай бұрын

    Awesome bro👏

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    Thanks ✌️

  • @luthecoder
    @luthecoder2 ай бұрын

    Please make more rust api videos like these! especially authentication related ones as well like protected routes etc

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    thank you for the suggestion! i'll definitely have this in mind.

  • @widyadarmawirawan2959
    @widyadarmawirawan29593 ай бұрын

    Awesome bro

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    Thank you!

  • @benspencer1163
    @benspencer116310 күн бұрын

    thank you for the video, but I'd really appreciate a follow up video... you do a very good job with your explanation

  • @FloWoelki

    @FloWoelki

    9 күн бұрын

    Thank you! What do you have in mind for a follow-up video?

  • @benspencer1163

    @benspencer1163

    8 күн бұрын

    @@FloWoelki email using actix web and every other backend things that make up backend frameworks

  • @FloWoelki

    @FloWoelki

    8 күн бұрын

    @@benspencer1163 thank you! I've already written some ideas down :)

  • @cempack
    @cempack2 ай бұрын

    What do you think about Rocket ? What's the differences between Actix web and Rocket. I've been interested into rust pretty recently and I didn't really catch the difference even tho Rocket seems much more batteries included, but I guess there is a reason why Actix is much more popular?

  • @FloWoelki

    @FloWoelki

    Ай бұрын

    I personally think that Rocket does not have a lot of updates. That's why I think that Actix-Web and Axum are more popular. Axum is also much leaner and simpler than Actix-Web.

  • @filipniklas
    @filipniklas2 ай бұрын

    Nice! What do you recommend for a Rust newbie to learn first, Actix web or axum? (Or something else?)

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    thanks :) I would recommend learning the language first :D jokes aside, I think it doesn't matter. in the end Actix Web and Axum both perform better than any node or python web server, and that's what matters. I would say, pick based on preference and project constraints.

  • @ImranKhan-br5dv
    @ImranKhan-br5dv3 ай бұрын

    Please make some more videos on this .😊

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    Yes I will, thank you for watching! :)

  • @ImranKhan-br5dv

    @ImranKhan-br5dv

    2 ай бұрын

    @@FloWoelki I will be waiting for this series , please try to complete ASAP .

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    @@ImranKhan-br5dv haha I'll try to. Obviously I've limited resources and time and other videos in the pipeline as well. But follow-up videos will come!

  • @Christobanistan
    @Christobanistan25 күн бұрын

    So what's the best server side framework that works with HTMX (and Actix of course)?

  • @hitesh7481
    @hitesh748123 күн бұрын

    what is the extension you are using which is saying main is not async at 2:47? thats pretty cool

  • @FloWoelki

    @FloWoelki

    22 күн бұрын

    It's not an extension; it's a plugin in nvim that I've used. But generally, you can google for whatever IDE/Editor you use: "show inline errors". That should work.

  • @ricardorochadev
    @ricardorochadev2 ай бұрын

    Hi Flo, Have you already tested axum?

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    hey there, big fan of Axum as well! especially the integration with tokio. :) what do you think about it?

  • @iBeepHQ
    @iBeepHQ2 ай бұрын

    Please, don't stop this Actix Web series.

  • @FloWoelki

    @FloWoelki

    2 ай бұрын

    I'll try my best to come up with some things about actix web. Do you have ideas that you definitely struggle with or want to see?

  • @AsherDMckoy
    @AsherDMckoy26 күн бұрын

    Is that a vim plugin for the automatic imports and line errors?

  • @FloWoelki

    @FloWoelki

    26 күн бұрын

    Yes! I use `lsp-zero` with some additional configuration.

  • @Mooooov0815
    @Mooooov08153 ай бұрын

    I’m not sold on the idea that rusts performance benefits on the web platform are actually worth the tradeoffs you have to deal with. It is a fairly difficult language with very long compile times. Sure, you get great performance. But you can get decent performance with Go without having to deal with any of those tradeoffs

  • @workingdemofirsttime4838

    @workingdemofirsttime4838

    3 ай бұрын

    ElysiaJS running on BunJS is completing with gin and actix Very exciting stuff in typescript

  • @Mr.BinarySniper

    @Mr.BinarySniper

    3 ай бұрын

    stop doing this.. go is great language. but when it comes to milisecond performance benchmark go sucks..

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    I agree with you all. Go is a wonderful language compared to Rust. However, Rust can also be a wonderful language if you try to master it. Rust is becoming more the language when it comes to building tools. There are a lot of popular tools out there that are based on Rust (quite recently Rolldown in the JavaScript/TypeScript world). Some compilers are also written in Rust, just because of the safety and huge performance of Rust. But I agree, if you do have maybe microservices, Golang is a powerful choice because everyone understands the language almost instantly and can get used to it.

  • @steveoc64

    @steveoc64

    3 ай бұрын

    Considering that Rust was designed for a pretty narrow use-case - For building a desktop app (Firefox) that would be placed in the hands of users + abusers, with an emphasis on memory safety through lifetime management. This is a completely different set of challenges to an application that runs on a backend server somewhere. The backend server environment has been refined over many years, and has its own safety considerations that are not the same as a desktop app. They barely overlap even. And yet we see people trying to use Rust now for backend server development ... because "safety". Throwing out decades of real-world tested ways of providing safety on the server, with this desktop-centric "memory safety" thing instead. It's a completely false argument, and wildly counter productive. With the performance angle - the "but performance" argument is also false ... because Rust compromises on performance and resource consumption to provide safety (and the wrong type of safety at that). If you care about "millisecond performance" - then Go is more than good enough. (geez - even Python or Node is more than good enough if milliseconds are your benchmark) Rust is OK if you care about microsecond performance (as is Go / Erlang / Bun etc) If you care about nanosecond performance, then Rust is not even in the ballpark.

  • @StefanSchade721229

    @StefanSchade721229

    3 ай бұрын

    If you struggle with Rust - ask chat got for help. I am using version 4 and find it's ability to explain a powerful tool. Rust is totally worth it if you look at benchmarks

  • @brownboyintokyo7368
    @brownboyintokyo73687 күн бұрын

    how would one deploy a rust backend ?

  • @FloWoelki

    @FloWoelki

    6 күн бұрын

    Depends on your preferences :) But, generally `cargo build --release` puts the resulting binary in the `target/release` directory.

  • @0x72F
    @0x72FАй бұрын

    great video! can someone help me with returning everything from the arc as json? #[actix_web::get("/users")] async fn get_users(db: web::Data) -> impl Responder { HttpResponse::Ok().json(WHAT TO DO HERE) }

  • @0x72F

    @0x72F

    Ай бұрын

    #[actix_web::get("/users")] async fn get_users(db: web::Data) -> impl Responder { let mut users = Vec::new(); let db = db.lock().unwrap(); for k in db.keys() { match db.get(k) { Some(user) => users.push(user), None => println!("Error while getting user #{}", k), } } HttpResponse::Ok().json(users) } is this ok? thanks

  • @user-gchgctv
    @user-gchgctv3 ай бұрын

    Awesome bro

  • @FloWoelki

    @FloWoelki

    3 ай бұрын

    Thanks 🤗

Келесі