home.social

#actixweb — Public Fediverse posts

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

  1. #htmx is really awesome! Yesterday, I was able to replace ~100 lines of #JavaScript with ~60 lines of #rustlang code for rendering the same content. At the same time I even got small UX-improvements (i.e. hx-trigger provides many more features than I could implement correvtly myself)

    The huge benefit: I am 1000 times more *confident* in the correctness & robustness of my Rust code (mainly because I am much more experienced in Rust) compared to js.

    On the Rust side, I use #actixweb and #maud.

  2. Продолжаем работать с Actix Web (часть 1)

    Продолжим работу с Actix Web и сделаем реальный пример мессенджера В этой статье также покроются темы jwt и raw sql в rust

    habr.com/ru/articles/839376/

    #actixweb #rust #backend

  3. Начало работы с Actix Web

    Actix Web или как влиться в производительность. В этой статье есть все необходимое, чтобы начать писать на actix web

    habr.com/ru/articles/839158/

    #actixweb #rust #backend

  4. @d2718 ooh thanks!

    I actually found a different one (rust_cgi), but yours might be better because I can (probably, for example) make an project and then have a custom executable that receives the call through CGI instead of the regular server.

    The other one already uses hyper's http library, but an outdated version, so I'm not sure how that'll play with whatever Actix expects. Since dumb_cgi is nearly nothing, I can see myself fitting it onto whatever :rust:

  5. Написать X-docker-isolation-provider сложно — но не невозможно

    Вы когда-нибудь чувствовали себя пионерами? Вот именно так я себя и ощущал, когда писал docker-isolation-provider для платформы ассоциативного программирования Deep . Все было так: в один прекрасный день у нас на платформе связей решили - было бы славно портировать нашего бота в Deep . А для этого нужно было написать так называемые провайдеры . Провайдеры нужны лишь для одной цели - дать возможность пользователю выполнять пользовательские хэндлеры на любом языке. Тогда я просто подумал, что было бы неплохо помочь парням, которые вероятно Rust никогда в жизни не видели . Ох, как же я тогда ошибался…

    habr.com/ru/articles/822093/

    #deepfoundation #программирование #история_разработки #rust #actixweb #serde #wasm

  6. Написать X-docker-isolation-provider сложно — но не невозможно

    Вы когда-нибудь чувствовали себя пионерами? Вот именно так я себя и ощущал, когда писал docker-isolation-provider для платформы ассоциативного программирования Deep . Все было так: в один прекрасный день у нас на платформе связей решили - было бы славно портировать нашего бота в Deep . А для этого нужно было написать так называемые провайдеры . Провайдеры нужны лишь для одной цели - дать возможность пользователю выполнять пользовательские хэндлеры на любом языке. Тогда я просто подумал, что было бы неплохо помочь парням, которые вероятно Rust никогда в жизни не видели . Ох, как же я тогда ошибался…

    habr.com/ru/articles/822093/

    #deepfoundation #программирование #история_разработки #rust #actixweb #serde #wasm

  7. Написать X-docker-isolation-provider сложно — но не невозможно

    Вы когда-нибудь чувствовали себя пионерами? Вот именно так я себя и ощущал, когда писал docker-isolation-provider для платформы ассоциативного программирования Deep . Все было так: в один прекрасный день у нас на платформе связей решили - было бы славно портировать нашего бота в Deep . А для этого нужно было написать так называемые провайдеры . Провайдеры нужны лишь для одной цели - дать возможность пользователю выполнять пользовательские хэндлеры на любом языке. Тогда я просто подумал, что было бы неплохо помочь парням, которые вероятно Rust никогда в жизни не видели . Ох, как же я тогда ошибался…

    habr.com/ru/articles/822093/

    #deepfoundation #программирование #история_разработки #rust #actixweb #serde #wasm

  8. I’ve been looking into whether it is realistic to replace nginx with a Rust-based web server at this point. First finding: there aren’t any usable configurable web servers written in Rust, but there are some very advanced frameworks if you are willing to write Rust code.

    Now I wouldn’t mind turning the nginx configuration into Rust code, provided that this doesn’t add too much complexity. I had to solve quite a few things in a suboptimal fashion in the nginx configuration, this could be done properly in a real programming language. And the prospect of converting some small Python-based applications into integral parts of the web server by rewriting them in Rust is tempting.

    Unfortunately, I found that things aren’t quite there yet. In particular, TLS configuration with multiple certificates (SNI) isn’t a supported scenario: Actix, Axum and Warp all expect you to access Rustls directly for that and write code that isn’t exactly trivial.

    Logging is another sore point. Axum has a logging approach that is really alien for web servers. If you want the standard logging format, you have to implement it yourself. And while the other two support the standard logging format out of the box, delivering log entries to log files is your responsibility with all three libraries.

    Finally, there is the matter of pre-compressed static files, a very useful feature to achieve best performance – at least if you serve lots of static files, which my server does. Yet only Axum currently supports it. Actix has a pull request adding this feature which has been ignored for the past two years, and adding it without patching the library seems to involve completely reimplementing handling of static files. It’s the same situation with Warp, minus the pull request.

    Yes, it was probably naive of me to expect these frameworks to cover my use case properly. But they are really close…

    #Rustlang #nginx #ActixWeb #Axum #Warp

  9. Discover the essential steps to enhance the security of your Actix Web API in Rust by implementing both Basic and Bearer authentication mechanisms for robust protection against unauthorized access.

    bocksdincoding.com/blog/securi

    #rust #rustlang #programming #tutorial #actixweb #rest #api #security

  10. Finally had time to update rust-embed-for-web and actix-web-rust-embed-responder. I made these for embedding files into rust programs and serving them with actix web servers. Extremely efficient: 0 copy, headers and compression computed at compile time.

    No changes with this update, just brought all the dependencies up to date. I might make an update later to use Cow if I can figure out how to use it :blobfoxlurk2glare:

    crates.io/crates/rust-embed-fo

    crates.io/crates/actix-web-rus

  11. If anyone out there is using both #actixweb and #htmx (there must be dozens of us!) then I’ve just released the first version of a crate that might be useful to you: crates.io/crates/actix-htmx. Feedback & pull requests welcome at github.com/welshdave/actix-htm #rustlang #actix

  12. @stvm is extremely flexible and easy to get started with, so I definitely recommend checking out their getting started docs!

    Using with is an ultra fast and powerful backend to be sure! However, if your web app doesn't require squeezing every single bit of performance out of your device, I HIGHLY recommend using a backend! @golang is extremely performant language and simple to learn. It would serve a React page w/ ease! 😎 :golang: :react: 🤘

  13. Using actix-web for a personal project (a personal finances/budgeting program), it's a lot nicer than I remember

  14. Is there an accepted pattern for replacing your database pool in an #actixweb application? As in, the system is rotating the database password, updates the file handle it’s passed through to the application, and then my application should reconnect using the new credentials and drop the old connection.
    #rustlang #rust #sqlx #ProgrammingPatterns

  15. Just released a small update to my crate for serving files embedded into your server: crates.io/crates/actix-web-rus

    Actix-Web's latest release added support for Cow message bodies in responses, which allows my crate to avoid an unnecessary clone on each request. That gives a 10x or more performance improvement depending on the file size!

    (This also makes my fork of rust-embed a lot less necessary, but oh well, I'll be glad if I don't have to maintain my own fork)

  16. I've just open sourced a labour of love on weekends and spare time for the past year or so:

    github.com/cetra3/divedb

    Live site here: divedb.net/

    Using #rust, #actixweb & #postgresql for the backend and #sveltekit for the frontend

  17. Just released another crate: crates.io/crates/actix-web-rus

    If you are building a web app with , you can use rust-embed to embed your assets into your server executable. Then my crate helps you serve these embedded assets!

    ETag & Last Modified headers, cache revalidation with `If-None-Match`, compression... all of that is handled out of the box for you!

    As an added bonus, I have a fork of rust-embed which speeds up serving embedded files by 20% or more:
    crates.io/crates/rust-embed-fo

  18. The other day I happened upon #actixWeb, a high-level web serving framework based on #actix, for #rust.

    Oh, dear.

    None of the examples and guides work. Absolutely nothing.

    Hard pass.