home.social

#axum — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #axum, aggregated by home.social.

  1. It looks like release 0.9 is cooking. I'm really looking forward to it as it will feature support for routes with static suffixes prefixes like `/images/{id}.png`, IMO an absolute must have (or, rather, router without it would just be crippled). Many thanks for Ibraheem Ahmed for implementing it in matchit crate and David Mládek for adding support for it on axum side, while I just stood up to update it to the state acceptable for merging.

  2. So I have read some more about the whole #dioxus vs #tauri plus #leptos plus #axum for a #rust #rustlang #desktop app.

    From what I read by now, I would say that I will try the tauri route next. I would still prefer if Dioxus would just work, but what makes me wary about whether Dioxus would be a sustainable choice is that there's a lot of issues in the Dioxus repository that do not even have a reply by a maintainer. My own issues (which are relatively young!) have only little interaction. I get that this is an open source project and maintainer overload and so on, sure. But there's also something about Dioxus being funded? So there are full-time devs (plural!) working on it? What can I say? This makes me wary.

    Going down that tauri route would mean that I would need to build the whole thing myself. That could work, but is more than I would have liked to do. I want to develop my app functionality, not set up a GUI development environment.

    I could also go for a TUI first, but tbh, I would rather like to have a GUI first, with a clean API that I can then reuse to build a TUI on top of it. Not sure why, the other way around would probably work as well 🤔.

    Either way, I would then try leptos as framework for the app, because it looks rather good from what I can read from its documentation, and I can use axum in the backend, which I think fits my needs as well. (Btw developing this with ratatui with a axum backend would also be possible, but that's not the "native way" for a ratatui app, but much more for a leptos app as I understand it, so I expect less headaches here).

    I hope I can get a MVP fast, so I can get back to developing my core application stuff, because there's sooo much missing still.

  3. So I have read some more about the whole #dioxus vs #tauri plus #leptos plus #axum for a #rust #rustlang #desktop app.

    From what I read by now, I would say that I will try the tauri route next. I would still prefer if Dioxus would just work, but what makes me wary about whether Dioxus would be a sustainable choice is that there's a lot of issues in the Dioxus repository that do not even have a reply by a maintainer. My own issues (which are relatively young!) have only little interaction. I get that this is an open source project and maintainer overload and so on, sure. But there's also something about Dioxus being funded? So there are full-time devs (plural!) working on it? What can I say? This makes me wary.

    Going down that tauri route would mean that I would need to build the whole thing myself. That could work, but is more than I would have liked to do. I want to develop my app functionality, not set up a GUI development environment.

    I could also go for a TUI first, but tbh, I would rather like to have a GUI first, with a clean API that I can then reuse to build a TUI on top of it. Not sure why, the other way around would probably work as well 🤔.

    Either way, I would then try leptos as framework for the app, because it looks rather good from what I can read from its documentation, and I can use axum in the backend, which I think fits my needs as well. (Btw developing this with ratatui with a axum backend would also be possible, but that's not the "native way" for a ratatui app, but much more for a leptos app as I understand it, so I expect less headaches here).

    I hope I can get a MVP fast, so I can get back to developing my core application stuff, because there's sooo much missing still.

  4. So I have read some more about the whole #dioxus vs #tauri plus #leptos plus #axum for a #rust #rustlang #desktop app.

    From what I read by now, I would say that I will try the tauri route next. I would still prefer if Dioxus would just work, but what makes me wary about whether Dioxus would be a sustainable choice is that there's a lot of issues in the Dioxus repository that do not even have a reply by a maintainer. My own issues (which are relatively young!) have only little interaction. I get that this is an open source project and maintainer overload and so on, sure. But there's also something about Dioxus being funded? So there are full-time devs (plural!) working on it? What can I say? This makes me wary.

    Going down that tauri route would mean that I would need to build the whole thing myself. That could work, but is more than I would have liked to do. I want to develop my app functionality, not set up a GUI development environment.

    I could also go for a TUI first, but tbh, I would rather like to have a GUI first, with a clean API that I can then reuse to build a TUI on top of it. Not sure why, the other way around would probably work as well 🤔.

    Either way, I would then try leptos as framework for the app, because it looks rather good from what I can read from its documentation, and I can use axum in the backend, which I think fits my needs as well. (Btw developing this with ratatui with a axum backend would also be possible, but that's not the "native way" for a ratatui app, but much more for a leptos app as I understand it, so I expect less headaches here).

    I hope I can get a MVP fast, so I can get back to developing my core application stuff, because there's sooo much missing still.

  5. So I have read some more about the whole #dioxus vs #tauri plus #leptos plus #axum for a #rust #rustlang #desktop app.

    From what I read by now, I would say that I will try the tauri route next. I would still prefer if Dioxus would just work, but what makes me wary about whether Dioxus would be a sustainable choice is that there's a lot of issues in the Dioxus repository that do not even have a reply by a maintainer. My own issues (which are relatively young!) have only little interaction. I get that this is an open source project and maintainer overload and so on, sure. But there's also something about Dioxus being funded? So there are full-time devs (plural!) working on it? What can I say? This makes me wary.

    Going down that tauri route would mean that I would need to build the whole thing myself. That could work, but is more than I would have liked to do. I want to develop my app functionality, not set up a GUI development environment.

    I could also go for a TUI first, but tbh, I would rather like to have a GUI first, with a clean API that I can then reuse to build a TUI on top of it. Not sure why, the other way around would probably work as well 🤔.

    Either way, I would then try leptos as framework for the app, because it looks rather good from what I can read from its documentation, and I can use axum in the backend, which I think fits my needs as well. (Btw developing this with ratatui with a axum backend would also be possible, but that's not the "native way" for a ratatui app, but much more for a leptos app as I understand it, so I expect less headaches here).

    I hope I can get a MVP fast, so I can get back to developing my core application stuff, because there's sooo much missing still.

  6. So I have read some more about the whole #dioxus vs #tauri plus #leptos plus #axum for a #rust #rustlang #desktop app.

    From what I read by now, I would say that I will try the tauri route next. I would still prefer if Dioxus would just work, but what makes me wary about whether Dioxus would be a sustainable choice is that there's a lot of issues in the Dioxus repository that do not even have a reply by a maintainer. My own issues (which are relatively young!) have only little interaction. I get that this is an open source project and maintainer overload and so on, sure. But there's also something about Dioxus being funded? So there are full-time devs (plural!) working on it? What can I say? This makes me wary.

    Going down that tauri route would mean that I would need to build the whole thing myself. That could work, but is more than I would have liked to do. I want to develop my app functionality, not set up a GUI development environment.

    I could also go for a TUI first, but tbh, I would rather like to have a GUI first, with a clean API that I can then reuse to build a TUI on top of it. Not sure why, the other way around would probably work as well 🤔.

    Either way, I would then try leptos as framework for the app, because it looks rather good from what I can read from its documentation, and I can use axum in the backend, which I think fits my needs as well. (Btw developing this with ratatui with a axum backend would also be possible, but that's not the "native way" for a ratatui app, but much more for a leptos app as I understand it, so I expect less headaches here).

    I hope I can get a MVP fast, so I can get back to developing my core application stuff, because there's sooo much missing still.

  7. It looks like is finally going to get proper route matching with prefixes and suffixes support (e.g. `/images/{foo}.jpg`, while before only `/images/{foo}` was supported).
    github.com/tokio-rs/axum/pull/

  8. It looks like #axum is finally going to get proper route matching with prefixes and suffixes support (e.g. `/images/{foo}.jpg`, while before only `/images/{foo}` was supported).
    github.com/tokio-rs/axum/pull/

  9. @pointlessone @rayk @tomekw I'm afraid you have biased view. There are two angles to the "web frameworks".

    1. #Axum and #Rails don't even play the same sport, the former's performace comes at cost of orders of magnitude more complex implementation; it was never intended to be #Django in #Rust

    2. The fact we have web frameworks in Rust is "an accident", the language was never intended to specifically write ones. Rust is a proper system programming language, the same class as C (not #Go w/GC).

  10. @pointlessone @rayk @tomekw I'm afraid you have biased view. There are two angles to the "web frameworks".

    1. #Axum and #Rails don't even play the same sport, the former's performace comes at cost of orders of magnitude more complex implementation; it was never intended to be #Django in #Rust

    2. The fact we have web frameworks in Rust is "an accident", the language was never intended to specifically write ones. Rust is a proper system programming language, the same class as C (not #Go w/GC).

  11. @pointlessone @rayk @tomekw I'm afraid you have biased view. There are two angles to the "web frameworks".

    1. #Axum and #Rails don't even play the same sport, the former's performace comes at cost of orders of magnitude more complex implementation; it was never intended to be #Django in #Rust

    2. The fact we have web frameworks in Rust is "an accident", the language was never intended to specifically write ones. Rust is a proper system programming language, the same class as C (not #Go w/GC).

  12. @pointlessone @rayk @tomekw I'm afraid you have biased view. There are two angles to the "web frameworks".

    1. #Axum and #Rails don't even play the same sport, the former's performace comes at cost of orders of magnitude more complex implementation; it was never intended to be #Django in #Rust

    2. The fact we have web frameworks in Rust is "an accident", the language was never intended to specifically write ones. Rust is a proper system programming language, the same class as C (not #Go w/GC).

  13. @pointlessone @rayk @tomekw I'm afraid you have biased view. There are two angles to the "web frameworks".

    1. #Axum and #Rails don't even play the same sport, the former's performace comes at cost of orders of magnitude more complex implementation; it was never intended to be #Django in #Rust

    2. The fact we have web frameworks in Rust is "an accident", the language was never intended to specifically write ones. Rust is a proper system programming language, the same class as C (not #Go w/GC).

  14. Built a full-stack Rust web app entirely with Claude Code. Claude wrote all the code, I just directed the features, architecture and tech.

    Stack:
    - Axum with async-graphql API
    - Dioxus WASM frontend
    - ReDB database

    It's an artillery calculator for the game Foxhole — place markers on maps, get firing solutions with wind compensation.

    Feel free to check it out: arty.dp42.dev
    Source code on my github

  15. Built a full-stack Rust web app entirely with Claude Code. Claude wrote all the code, I just directed the features, architecture and tech.

    Stack:
    - Axum with async-graphql API
    - Dioxus WASM frontend
    - ReDB database

    It's an artillery calculator for the game Foxhole — place markers on maps, get firing solutions with wind compensation.

    Feel free to check it out: arty.dp42.dev
    Source code on my github

    #Rust #WASM #Dioxus #Axum #AI #ClaudeCode #OpenSource #GameDev

  16. Built a full-stack Rust web app entirely with Claude Code. Claude wrote all the code, I just directed the features, architecture and tech.

    Stack:
    - Axum with async-graphql API
    - Dioxus WASM frontend
    - ReDB database

    It's an artillery calculator for the game Foxhole — place markers on maps, get firing solutions with wind compensation.

    Feel free to check it out: arty.dp42.dev
    Source code on my github

    #Rust #WASM #Dioxus #Axum #AI #ClaudeCode #OpenSource #GameDev

  17. Built a full-stack Rust web app entirely with Claude Code. Claude wrote all the code, I just directed the features, architecture and tech.

    Stack:
    - Axum with async-graphql API
    - Dioxus WASM frontend
    - ReDB database

    It's an artillery calculator for the game Foxhole — place markers on maps, get firing solutions with wind compensation.

    Feel free to check it out: arty.dp42.dev
    Source code on my github

    #Rust #WASM #Dioxus #Axum #AI #ClaudeCode #OpenSource #GameDev

  18. Built a full-stack Rust web app entirely with Claude Code. Claude wrote all the code, I just directed the features, architecture and tech.

    Stack:
    - Axum with async-graphql API
    - Dioxus WASM frontend
    - ReDB database

    It's an artillery calculator for the game Foxhole — place markers on maps, get firing solutions with wind compensation.

    Feel free to check it out: arty.dp42.dev
    Source code on my github

    #Rust #WASM #Dioxus #Axum #AI #ClaudeCode #OpenSource #GameDev

  19. * looks at the repo of a rust template
    * clicks at the maintainers name
    * clicks a link on his profiles

    Huh? "Coaching for your Daddy Phase"?

    github.com/graysonarts

    #rust #axum #daddy

  20. * looks at the repo of a rust template
    * clicks at the maintainers name
    * clicks a link on his profiles

    Huh? "Coaching for your Daddy Phase"?

    github.com/graysonarts

    #rust #axum #daddy

  21. * looks at the repo of a rust template
    * clicks at the maintainers name
    * clicks a link on his profiles

    Huh? "Coaching for your Daddy Phase"?

    github.com/graysonarts

    #rust #axum #daddy

  22. * looks at the repo of a rust template
    * clicks at the maintainers name
    * clicks a link on his profiles

    Huh? "Coaching for your Daddy Phase"?

    github.com/graysonarts

    #rust #axum #daddy

  23. [Перевод] Гексагональная архитектура в Rust: отвязываем бизнес-логику от Solana

    Представьте: вы строите сервис выдачи дипломов на Solana. Всё отлично, пока дело не доходит до тестов. Внезапно оказывается, что для проверки бизнес-логики нужно поднимать валидатор, искать тестовые токены и молиться на стабильность сети. Знакомая боль? В этой статье я покажу, как мы решили проблему, используя async-trait и dyn Trait. Мы превратили интеграционные тесты длиной в минуты в юнит-тесты, которые проходят за миллисекунды. Узнать решение

    habr.com/ru/articles/983874/

    #rust #solana #гексагональная_архитектура #блокчейн #unittesting #dependency_injection #axum #web3 #mocking #refactoring

  24. [Перевод] Гексагональная архитектура в Rust: отвязываем бизнес-логику от Solana

    Представьте: вы строите сервис выдачи дипломов на Solana. Всё отлично, пока дело не доходит до тестов. Внезапно оказывается, что для проверки бизнес-логики нужно поднимать валидатор, искать тестовые токены и молиться на стабильность сети. Знакомая боль? В этой статье я покажу, как мы решили проблему, используя async-trait и dyn Trait. Мы превратили интеграционные тесты длиной в минуты в юнит-тесты, которые проходят за миллисекунды. Узнать решение

    habr.com/ru/articles/983874/

    #rust #solana #гексагональная_архитектура #блокчейн #unittesting #dependency_injection #axum #web3 #mocking #refactoring

  25. [Перевод] Гексагональная архитектура в Rust: отвязываем бизнес-логику от Solana

    Представьте: вы строите сервис выдачи дипломов на Solana. Всё отлично, пока дело не доходит до тестов. Внезапно оказывается, что для проверки бизнес-логики нужно поднимать валидатор, искать тестовые токены и молиться на стабильность сети. Знакомая боль? В этой статье я покажу, как мы решили проблему, используя async-trait и dyn Trait. Мы превратили интеграционные тесты длиной в минуты в юнит-тесты, которые проходят за миллисекунды. Узнать решение

    habr.com/ru/articles/983874/

    #rust #solana #гексагональная_архитектура #блокчейн #unittesting #dependency_injection #axum #web3 #mocking #refactoring

  26. [Перевод] Гексагональная архитектура в Rust: отвязываем бизнес-логику от Solana

    Представьте: вы строите сервис выдачи дипломов на Solana. Всё отлично, пока дело не доходит до тестов. Внезапно оказывается, что для проверки бизнес-логики нужно поднимать валидатор, искать тестовые токены и молиться на стабильность сети. Знакомая боль? В этой статье я покажу, как мы решили проблему, используя async-trait и dyn Trait. Мы превратили интеграционные тесты длиной в минуты в юнит-тесты, которые проходят за миллисекунды. Узнать решение

    habr.com/ru/articles/983874/

    #rust #solana #гексагональная_архитектура #блокчейн #unittesting #dependency_injection #axum #web3 #mocking #refactoring

  27. A bonus entry: error handling.

    This is more of a Rust thing, not specific to Axum. So Rust has no exceptions. Instead rust has a Result type that can be either a "good" return value or an "error”.

    My fellow Rubyists probably know of this concept from other languages or maybe you’ve encountered Railway-Oriented Programming pattern (it resurfaces once in a while, here's a recent one: alchemists.io/articles/railway ).

    Anyway, one quirk is that since it's just a normal value, it doesn't have a backtrace attached to it. It can bubble up all the way to the main function and you wouldn't be any wiser where it came from.

    Another “inconvenience” is that Result<T, E> is generic but it also means that every concrete variant of both parameter types yields a completely separate type. There's no inheritance, you have to specifically address every instance of the Result type. Where in Ruby you can handle all exceptions by catching StandardError, you can't do that in Rust.

    The idiomatic solution is to have your own error type that wraps other error types and implement conversion from those error types to your own error type.

    There are a few crates (packages, like gems) that try to address various aspects of this. I settled on rootcause which sorts out the backtrace deficiency. It allows for even more reach contexts attached to the errors. This is even better than in Ruby. It's always obvious in Rust where you can potentially get an error so it’s easy to provide relevant context.

    However it only partially addresses the multitude of errors issue. I still had to implement my own error type to wrap around rootcause's Report because Rust doesn't allow to implement external traits (like Axum's IntoResponse) for external types (like, rootcause's Report). So in order for my handlers to be able to return proper Results that Axum could turn into responses I have to have this intermediate glue type.

    But it let me have error pages with backtraces like in Rails, which is neat. But again, it's not a built-in feature, it's something I had to build myself.

    I suspect there's nothing like errbit/sentry/rollbar. What do people use to catch failures in production? Anything for monitoring, metrics?

    #Axum #Ruby #RubyOnRails #Rust

  28. A bonus entry: error handling.

    This is more of a Rust thing, not specific to Axum. So Rust has no exceptions. Instead rust has a Result type that can be either a "good" return value or an "error”.

    My fellow Rubyists probably know of this concept from other languages or maybe you’ve encountered Railway-Oriented Programming pattern (it resurfaces once in a while, here's a recent one: alchemists.io/articles/railway ).

    Anyway, one quirk is that since it's just a normal value, it doesn't have a backtrace attached to it. It can bubble up all the way to the main function and you wouldn't be any wiser where it came from.

    Another “inconvenience” is that Result<T, E> is generic but it also means that every concrete variant of both parameter types yields a completely separate type. There's no inheritance, you have to specifically address every instance of the Result type. Where in Ruby you can handle all exceptions by catching StandardError, you can't do that in Rust.

    The idiomatic solution is to have your own error type that wraps other error types and implement conversion from those error types to your own error type.

    There are a few crates (packages, like gems) that try to address various aspects of this. I settled on rootcause which sorts out the backtrace deficiency. It allows for even more reach contexts attached to the errors. This is even better than in Ruby. It's always obvious in Rust where you can potentially get an error so it’s easy to provide relevant context.

    However it only partially addresses the multitude of errors issue. I still had to implement my own error type to wrap around rootcause's Report because Rust doesn't allow to implement external traits (like Axum's IntoResponse) for external types (like, rootcause's Report). So in order for my handlers to be able to return proper Results that Axum could turn into responses I have to have this intermediate glue type.

    But it let me have error pages with backtraces like in Rails, which is neat. But again, it's not a built-in feature, it's something I had to build myself.

    I suspect there's nothing like errbit/sentry/rollbar. What do people use to catch failures in production? Anything for monitoring, metrics?

    #Axum #Ruby #RubyOnRails #Rust

  29. A bonus entry: error handling.

    This is more of a Rust thing, not specific to Axum. So Rust has no exceptions. Instead rust has a Result type that can be either a "good" return value or an "error”.

    My fellow Rubyists probably know of this concept from other languages or maybe you’ve encountered Railway-Oriented Programming pattern (it resurfaces once in a while, here's a recent one: alchemists.io/articles/railway ).

    Anyway, one quirk is that since it's just a normal value, it doesn't have a backtrace attached to it. It can bubble up all the way to the main function and you wouldn't be any wiser where it came from.

    Another “inconvenience” is that Result<T, E> is generic but it also means that every concrete variant of both parameter types yields a completely separate type. There's no inheritance, you have to specifically address every instance of the Result type. Where in Ruby you can handle all exceptions by catching StandardError, you can't do that in Rust.

    The idiomatic solution is to have your own error type that wraps other error types and implement conversion from those error types to your own error type.

    There are a few crates (packages, like gems) that try to address various aspects of this. I settled on rootcause which sorts out the backtrace deficiency. It allows for even more reach contexts attached to the errors. This is even better than in Ruby. It's always obvious in Rust where you can potentially get an error so it’s easy to provide relevant context.

    However it only partially addresses the multitude of errors issue. I still had to implement my own error type to wrap around rootcause's Report because Rust doesn't allow to implement external traits (like Axum's IntoResponse) for external types (like, rootcause's Report). So in order for my handlers to be able to return proper Results that Axum could turn into responses I have to have this intermediate glue type.

    But it let me have error pages with backtraces like in Rails, which is neat. But again, it's not a built-in feature, it's something I had to build myself.

    I suspect there's nothing like errbit/sentry/rollbar. What do people use to catch failures in production? Anything for monitoring, metrics?

    #Axum #Ruby #RubyOnRails #Rust

  30. A bonus entry: error handling.

    This is more of a Rust thing, not specific to Axum. So Rust has no exceptions. Instead rust has a Result type that can be either a "good" return value or an "error”.

    My fellow Rubyists probably know of this concept from other languages or maybe you’ve encountered Railway-Oriented Programming pattern (it resurfaces once in a while, here's a recent one: alchemists.io/articles/railway ).

    Anyway, one quirk is that since it's just a normal value, it doesn't have a backtrace attached to it. It can bubble up all the way to the main function and you wouldn't be any wiser where it came from.

    Another “inconvenience” is that Result<T, E> is generic but it also means that every concrete variant of both parameter types yields a completely separate type. There's no inheritance, you have to specifically address every instance of the Result type. Where in Ruby you can handle all exceptions by catching StandardError, you can't do that in Rust.

    The idiomatic solution is to have your own error type that wraps other error types and implement conversion from those error types to your own error type.

    There are a few crates (packages, like gems) that try to address various aspects of this. I settled on rootcause which sorts out the backtrace deficiency. It allows for even more reach contexts attached to the errors. This is even better than in Ruby. It's always obvious in Rust where you can potentially get an error so it’s easy to provide relevant context.

    However it only partially addresses the multitude of errors issue. I still had to implement my own error type to wrap around rootcause's Report because Rust doesn't allow to implement external traits (like Axum's IntoResponse) for external types (like, rootcause's Report). So in order for my handlers to be able to return proper Results that Axum could turn into responses I have to have this intermediate glue type.

    But it let me have error pages with backtraces like in Rails, which is neat. But again, it's not a built-in feature, it's something I had to build myself.

    I suspect there's nothing like errbit/sentry/rollbar. What do people use to catch failures in production? Anything for monitoring, metrics?

    #Axum #Ruby #RubyOnRails #Rust

  31. OK, that's a wrap for now.

    My current impression is that Rust is decades behind Ruby in terms of developer experience. There are some neat ideas, some features that are only possible because of Rust's type system, performance is definitely incomparable. But the things that are called a framework in Rust would never be called that in Ruby. Rust can not be compared to Ruby in terms of development speed.

    I can not stress that enough. What's done in Rails with a scaffold and a few lines of code took me like a solid week and I'm still nowhere near the end of it. Yes, I have to learn a lot. But I have to learn a lot precisely because basics are not covered in the docs and I can't copy-paste pieces to have the same (or analogous) thing as in Rails.

    It's rather the basics are different. In Rails basics are CRUD. In Rust basics are how to run a router on top of a socket. A form to update a record in the db is an advanced topic in Rust web development. Unfortunately.

    #Axum #Ruby #RubyOnRails #Rust

  32. OK, that's a wrap for now.

    My current impression is that Rust is decades behind Ruby in terms of developer experience. There are some neat ideas, some features that are only possible because of Rust's type system, performance is definitely incomparable. But the things that are called a framework in Rust would never be called that in Ruby. Rust can not be compared to Ruby in terms of development speed.

    I can not stress that enough. What's done in Rails with a scaffold and a few lines of code took me like a solid week and I'm still nowhere near the end of it. Yes, I have to learn a lot. But I have to learn a lot precisely because basics are not covered in the docs and I can't copy-paste pieces to have the same (or analogous) thing as in Rails.

    It's rather the basics are different. In Rails basics are CRUD. In Rust basics are how to run a router on top of a socket. A form to update a record in the db is an advanced topic in Rust web development. Unfortunately.

    #Axum #Ruby #RubyOnRails #Rust

  33. OK, that's a wrap for now.

    My current impression is that Rust is decades behind Ruby in terms of developer experience. There are some neat ideas, some features that are only possible because of Rust's type system, performance is definitely incomparable. But the things that are called a framework in Rust would never be called that in Ruby. Rust can not be compared to Ruby in terms of development speed.

    I can not stress that enough. What's done in Rails with a scaffold and a few lines of code took me like a solid week and I'm still nowhere near the end of it. Yes, I have to learn a lot. But I have to learn a lot precisely because basics are not covered in the docs and I can't copy-paste pieces to have the same (or analogous) thing as in Rails.

    It's rather the basics are different. In Rails basics are CRUD. In Rust basics are how to run a router on top of a socket. A form to update a record in the db is an advanced topic in Rust web development. Unfortunately.

    #Axum #Ruby #RubyOnRails #Rust

  34. OK, that's a wrap for now.

    My current impression is that Rust is decades behind Ruby in terms of developer experience. There are some neat ideas, some features that are only possible because of Rust's type system, performance is definitely incomparable. But the things that are called a framework in Rust would never be called that in Ruby. Rust can not be compared to Ruby in terms of development speed.

    I can not stress that enough. What's done in Rails with a scaffold and a few lines of code took me like a solid week and I'm still nowhere near the end of it. Yes, I have to learn a lot. But I have to learn a lot precisely because basics are not covered in the docs and I can't copy-paste pieces to have the same (or analogous) thing as in Rails.

    It's rather the basics are different. In Rails basics are CRUD. In Rust basics are how to run a router on top of a socket. A form to update a record in the db is an advanced topic in Rust web development. Unfortunately.

    #Axum #Ruby #RubyOnRails #Rust

  35. OK, that's a wrap for now.

    My current impression is that Rust is decades behind Ruby in terms of developer experience. There are some neat ideas, some features that are only possible because of Rust's type system, performance is definitely incomparable. But the things that are called a framework in Rust would never be called that in Ruby. Rust can not be compared to Ruby in terms of development speed.

    I can not stress that enough. What's done in Rails with a scaffold and a few lines of code took me like a solid week and I'm still nowhere near the end of it. Yes, I have to learn a lot. But I have to learn a lot precisely because basics are not covered in the docs and I can't copy-paste pieces to have the same (or analogous) thing as in Rails.

    It's rather the basics are different. In Rails basics are CRUD. In Rust basics are how to run a router on top of a socket. A form to update a record in the db is an advanced topic in Rust web development. Unfortunately.

    #Axum #Ruby #RubyOnRails #Rust

  36. Oh, right, almost forgot. Axum provides router but doesn't provide anything to generate URLs. And as far as I can tell, it's on purpose.

    In rails you get named routes and helpers to generate URLs for them. It a little thing but it helps a lot when you change the URL but keep the name. You don't have to go through the whole app and change it everywhere but you still get the new URLs.

    In Axum it’s all just strings. You have to make sure you remember every place you have that URL and you’ll have to fix it manually.

    TBH, I'm baffled by this. Everywhere else everything has to be its own type and types have to be coherent. But here it's completely detached and suddenly stringly typed.

    #Axum #Ruby #RubyOnRails #Rust

  37. Oh, right, almost forgot. Axum provides router but doesn't provide anything to generate URLs. And as far as I can tell, it's on purpose.

    In rails you get named routes and helpers to generate URLs for them. It a little thing but it helps a lot when you change the URL but keep the name. You don't have to go through the whole app and change it everywhere but you still get the new URLs.

    In Axum it’s all just strings. You have to make sure you remember every place you have that URL and you’ll have to fix it manually.

    TBH, I'm baffled by this. Everywhere else everything has to be its own type and types have to be coherent. But here it's completely detached and suddenly stringly typed.

    #Axum #Ruby #RubyOnRails #Rust

  38. Oh, right, almost forgot. Axum provides router but doesn't provide anything to generate URLs. And as far as I can tell, it's on purpose.

    In rails you get named routes and helpers to generate URLs for them. It a little thing but it helps a lot when you change the URL but keep the name. You don't have to go through the whole app and change it everywhere but you still get the new URLs.

    In Axum it’s all just strings. You have to make sure you remember every place you have that URL and you’ll have to fix it manually.

    TBH, I'm baffled by this. Everywhere else everything has to be its own type and types have to be coherent. But here it's completely detached and suddenly stringly typed.

    #Axum #Ruby #RubyOnRails #Rust

  39. Oh, right, almost forgot. Axum provides router but doesn't provide anything to generate URLs. And as far as I can tell, it's on purpose.

    In rails you get named routes and helpers to generate URLs for them. It a little thing but it helps a lot when you change the URL but keep the name. You don't have to go through the whole app and change it everywhere but you still get the new URLs.

    In Axum it’s all just strings. You have to make sure you remember every place you have that URL and you’ll have to fix it manually.

    TBH, I'm baffled by this. Everywhere else everything has to be its own type and types have to be coherent. But here it's completely detached and suddenly stringly typed.

    #Axum #Ruby #RubyOnRails #Rust

  40. Oh, right, almost forgot. Axum provides router but doesn't provide anything to generate URLs. And as far as I can tell, it's on purpose.

    In rails you get named routes and helpers to generate URLs for them. It a little thing but it helps a lot when you change the URL but keep the name. You don't have to go through the whole app and change it everywhere but you still get the new URLs.

    In Axum it’s all just strings. You have to make sure you remember every place you have that URL and you’ll have to fix it manually.

    TBH, I'm baffled by this. Everywhere else everything has to be its own type and types have to be coherent. But here it's completely detached and suddenly stringly typed.

    #Axum #Ruby #RubyOnRails #Rust

  41. At this point I’m nearly at my wits end trying to build a form for a record that has multiple associated records.

    I haven't yet touched assets. I've seen solutions to embed assets into the compiled binary, which is neat. I like that the whole app can be deployed in a single file. I suspect the build for those assets has to be external.

    I also haven't touched background jobs. As far as I can tell there's nothing like Sidekiq for Rust. Though maybe there's something decent. I haven’t looked yet

    #Axum #Ruby #RubyOnRails #Rust

  42. At this point I’m nearly at my wits end trying to build a form for a record that has multiple associated records.

    I haven't yet touched assets. I've seen solutions to embed assets into the compiled binary, which is neat. I like that the whole app can be deployed in a single file. I suspect the build for those assets has to be external.

    I also haven't touched background jobs. As far as I can tell there's nothing like Sidekiq for Rust. Though maybe there's something decent. I haven’t looked yet

    #Axum #Ruby #RubyOnRails #Rust