Closed Marchand-Nicolas closed 2 months ago
I am applying to this issue via OnlyDust platform.
I am front end developer with 6 years experience. i have worked with microsoft on several projects, this will be my first time contributing to the hackathon and i am ready to work
I would approach this issue with following steps
Set up a global route registry: In your main application, you need to set up a global route registry using a Mutex<Vec<Box
I am applying to this issue via OnlyDust platform.
I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet community.
To update and simplify the routing system using the axum_auto_routes
library, here’s how I would approach the problem:
Cargo.toml
: Replace the outdated version of axum_auto_routes
with the latest version by adding the following line:
[dependencies]
axum_auto_routes = { git = "https://github.com/Th0rgal/axum_auto_routes" }
axum = "0.5" # Ensure the axum version matches your project’s requirements
ctor = "0.1"
cargo update
: Update the dependencies to fetch the latest version of the axum_auto_routes
library.#[route]
Macro: Convert existing route handler functions to use the #[route]
macro provided by axum_auto_routes
. This macro allows you to annotate async functions with HTTP methods and paths, streamlining the route registration process.lazy_static!
as shown in the provided example.WithState
Trait: Verify that the WithState
trait is implemented correctly, allowing your routes to be merged into the Axum router with shared state.main.rs
to utilize the global route registry. This will involve folding over the registered routes and merging them into the main router.axum_auto_routes
.This approach ensures a clean, maintainable routing system using the latest features of the axum_auto_routes
library, making your codebase more robust and easier to manage.
I am applying to this issue via OnlyDust platform.
With a background in frontend and blockchain development, I've worked extensively with web technologies and libraries. I can leverage my experience to update the routing system by integrating the latest axum_auto_routes
library, ensuring efficient handling of HTTP requests and improved code maintainability.
I would update the routing system by upgrading to the latest version of axum_auto_routes
. This involves:
The maintainer Marchand-Nicolas has assigned PoulavBhowmick03 to this issue via OnlyDust Platform. Good luck!
Thanks! Will start working on it asap
The aim of this issue is to simplify the way we handle http requests. More specifically, this is the
routing
system we want to improve, using theaxum_auto_routes
library: https://github.com/th0rgal/axum_auto_routesCurrently an outdated version of this lib is used which requires us to specify the path of the function (while instead you can now optionally specify middlewares)