Questions tagged [axum]

Axum is a domain specific concurrent programming language, based on the Actor model, being developed by Microsoft.

31 questions
10
votes
4 answers

What is this new Axum programming language?

I read this story on slashdot today where they announce a new parallel programming language by Microsoft. What is this new programming language about? It says Parallel Programming. But is it going to be an alternative/replacement for MPI, PVM,…
Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
7
votes
4 answers

.NET language for Concurrent programming

This may be a question that others have seen, but I am trying to find a language designed for (or with language support for) concurrent programming that can run on the .net platform. I have been doing side development in erlang to get a feel for…
Mike
  • 1,297
  • 2
  • 14
  • 22
4
votes
0 answers

Axum does no redirect when being in Root Route when redirecting from / and with routing normalization

I am trying to make a multilingual website that redirects you to the homepage in the corresponding language when accessing it's / route, but for some reason Axum is no being able to redirect, but only when setting the redirection from the / route…
Axum500
  • 41
  • 2
3
votes
1 answer

Axum vs TPL, Async

Axum is a language of its own based on subset and superset of C# 3.0 and TPL is extentions added to .Net 4.0. My question is, how does Axum compare to TPL in terms of performance, implementation and architecture. Same question for the C# 5.0…
Dustin Davis
  • 14,482
  • 13
  • 63
  • 119
2
votes
1 answer

Rust Axum framework - is unwrap safe?

I am using Rust Axum as my web framework. I am looking to use do mutable shared state in my route handlers. I came across this question: https://github.com/tokio-rs/axum/discussions/629 which pointed to this…
2
votes
1 answer

how to filter tracing log

I am a novice in rust. I try to use axum and the tracing framework to make a web program. When I use tracing and send requests, there will be hyper log output. How do I filter out these logs and keep the logs of my application itself? mycode: …
fxdom
  • 21
  • 2
2
votes
0 answers

Add custom jwt authentification in Axum rust

I am trying Axum to build a web server and I want to protect some routes with JWT. I build a function which take the token from request, check if it is valide then pass a data to handler function. But I have an error when compiling and I don't…
Kylo_Entro
  • 46
  • 5
2
votes
1 answer

Axum Query Extractor - Allow for struct with optional fields to be parsed?

Rust newbie here (and first time SO poster)! I am attempting to add pagination to my axum API, and am trying to use an optional Query extractor on a Pagination struct in my request, to allow for users to skip specifying Pagination and allow the…
1
vote
1 answer

Axum with Leptos: how do I get AppState in [server] Macro?

I try to work with axum and leptos on a fullstack app I am trying to use a server shared resource with SSR leptos handlers, which usually would be an AppState struct added to the router with with_state() After studying multiple examples, I am…
g4borg
  • 76
  • 6
1
vote
2 answers

How can I avoid duplication when I implement a trait for few similar types in Rust

I need to implement the axum::IntoResponse trait for serde structures because they come from another crate: struct BucketInfoListAxum(BucketList); impl IntoResponse for BucketInfoListAxum { fn into_response(self) -> Response { let mut…
atimin
  • 499
  • 4
  • 11
1
vote
1 answer

leptos with axum: Issue with wasm-bindgen versions

I am just getting started with Rust and Leptos, so I'm also quite new to the whole rust / cargo ecosystem. I was following the leptos tutorial to setup a new leptos project using axum. When I tried starting the project with cargo leptos watch I ran…
platzhersh
  • 1,520
  • 20
  • 35
1
vote
1 answer

Axum how to save spawn task JoinHandle to state so I can abort in future?

I am new to rust, I would like to spawn a task that can be aborted when running but am having trouble figuring out how to achieve what I want. What I have tried (does not compile): use std::time::Duration; use axum::extract::State; use…
Tom Berghuis
  • 491
  • 3
  • 10
  • 26
1
vote
1 answer

How to use HTTP/2 in axum only

I'm trying to use HTPP/2 in axum but I can't access it, neither with my browser nor with httpie. I've checked the documentation for axum and hyper, and since my English and programming skills are poor and I haven't found any information on the web,…
3moredays
  • 25
  • 3
1
vote
1 answer

Axum State for Reqwest Client

I am trying to create a shared reqwest Client to be used by request handlers in Axum, but I can't figure out how to add, extract, or wrap it so the type checking on the request handler passes. I tried this: use axum::{extract::State, routing::get,…
Redline
  • 441
  • 8
  • 20
1
vote
0 answers

How to use a struct method as an handler in Axum?

This works where the handler is a stand alone function use axum::{ routing::{get, post}, http::StatusCode, response::IntoResponse, Json, Router, }; use std::net::SocketAddr; #[tokio::main] async fn main() -> () { // build our…
Finlay Weber
  • 2,989
  • 3
  • 17
  • 37
1
2 3