Deploy Axum on Fly.io

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

ความคิดเห็น • 23

  • @alexzander__6334
    @alexzander__6334 2 ปีที่แล้ว +31

    thanks for video.
    appreciate that you made a lot of mistakes and then fixed them.
    this is very helpful because now we know how to fix them if we encounter them.
    a lot of youtubers these days only post perfect videos with no mistakes, but if you try their solutions ... most of the times its not going to work for your specific case.
    thanks a lot for honesty. peace.

  • @mosslightstudio
    @mosslightstudio 2 ปีที่แล้ว +3

    Would love to see something on axum in depth, your videos make things way easier to understand than most others I've seen.

  • @jamese.spivak4170
    @jamese.spivak4170 2 ปีที่แล้ว +7

    Awesome. Love your Rust content, and I'd really like to see more videos about using axum! Also, I kind of have a request. I've been learning Rust for a few months now, and i've even read "The Book" (the rust book), but how do you read something like this:
    fn recover(self, fun: F) -> Recover where
    Self: Filter + Sized,
    F: Func,
    F::Output: TryFuture + Send,
    ::Error: IsReject,
    That's just a random example I took from the Warp crate docs. I'm trying to learn a Rust web framework and so far Axum looks the most intuitive for me, but whenever I start digging into the docs for some crates, stuff like that above comes up, and it looks very intimidating. Would love a video of breaking something like that function down and how to read what's going on there lol

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว +4

      This video will go out in a few hours.

    • @jamese.spivak4170
      @jamese.spivak4170 2 ปีที่แล้ว

      @@chrisbiscardi wow unreal. Thank you!

  • @shapedthought
    @shapedthought 2 ปีที่แล้ว +5

    Couldn't you use Alpine as the image if you're not using the Rust image to do the compile step? Edit: you can also use multi stage Docker files to do the compile then copy binary over to Alpine to saving having the specify the build flags (assuming Alpine doesn't need anything installed, but that's not hard to do).

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว +3

      yeah definitely, or a slim variant of the official. I chose a "regular" image because I thought people would have an easier time with something that resembled a full distribution more than an optimized production image if they tried to replicate this.
      although note that cross-compiling to musl libc has it's own pitfalls, notably around the ring crate not being supported.

    • @shapedthought
      @shapedthought 2 ปีที่แล้ว +5

      @@chrisbiscardi I'm still amazed at how few lines are required in the Dockerfile after fighting with Node and TS for years.

  • @DJenriqez
    @DJenriqez ปีที่แล้ว

    I build rust on WSL, and my rust container only copy build files, not the best thing to do, but final image is very very small (don't remember but I had maybe 80 MB ?) and speed is incredible, because rust libraries are per version build cached.

  • @some84884
    @some84884 2 ปีที่แล้ว

    What's your tail desktop manager?

  • @kevinking385
    @kevinking385 2 ปีที่แล้ว

    I recently deployed an axum project and was originally using a container hosting service. I then found the lambda-web crate which seamlessly hooks an axum (/rocket/actix/warp) app up to lambda. Took a bit to get API gateway set up correctly, but it's been working great ever since! I recommend trying it out for something you want to be able to "scale to zero".

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว +1

      I tend to use the aws lambda Rust runtime directly if I'm creating serverless functions (github.com/awslabs/aws-lambda-rust-runtime) but for porting applications or needing to run in multiple kinds of environments that can be a great choice!

  • @huricane555555
    @huricane555555 2 ปีที่แล้ว

    What library do you use for sql? We use sqlx at work but there tends to be hashing issues when sql files are saved on different os

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว +1

      I tend to use sqlx myself as well

    • @huricane555555
      @huricane555555 2 ปีที่แล้ว

      @@chrisbiscardi Thanks!

  • @alexzander__6334
    @alexzander__6334 2 ปีที่แล้ว

    really like your setup. what's the font and vs code color scheme called ?

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว

      font is Meslo LG L DZ for Powerline, and theme is Night Owl

    • @alexzander__6334
      @alexzander__6334 2 ปีที่แล้ว

      @@chrisbiscardi thanks a lot

  • @underground635
    @underground635 2 ปีที่แล้ว

    What is your window manager looks cool

    • @chrisbiscardi
      @chrisbiscardi  2 ปีที่แล้ว +1

      it's yabai on macos

    • @underground635
      @underground635 2 ปีที่แล้ว

      @@chrisbiscardi thanks :D your videos are awesome i just discovered your channel and it's great

  • @Prime-o8f
    @Prime-o8f 2 ปีที่แล้ว

    #Axum #TigrayGenocide #FreeTigray

  • @kevkev6798
    @kevkev6798 2 ปีที่แล้ว +1

    If you are lazy, here is pastebin link where you can compile inside of docker :pastebin.com/AtGVsnrr
    The cargo project is called hello_world and don't forget to edit the address to "[::]:8080".parse.unwrap() like the video suggests