Axum template with features as crates

I'm attempting to structure my axum api into feature crates (sort of like magento modules). The plan is, each workspace crate owns its own route, db migrations, services and dtos, and the core app crate glues it together. The core crate would register each feature crate and provide ways to implement migrations, routes.

pub struct FeatureMigration {
    pub module: &'static str,
    pub name: &'static str,
    pub description: &'static str,
    pub up_sql: &'static str,
}

Ideally. Currently i cannot figure out if the reason i'm finding this difficult, its either my lack of experience in rust, or this architecture doesnt go so well with rust in general.

I've made an axum api before (specdb query), but wanted to make something larger, that would quickly become unmaintainable without some structure - and i quite like how Magento is structured into modules.

Questions are:

  1. Are there any axum templates with this sort of architecture?
  2. Has anyone here used an architecture like this? why or why not?

Not knowing what magento is or does, I can’t comment. Your lack of answers suggests I may not be the only one.

All I see is four strings. An example of what you are concretely doing with them, and how that fails, might get you answers.

What magento is or does isn't really important.

Its splitting the codebase up by feature slices. One crate for the jwt auth, which defines its routes, db migrations. And one crate for the blog, and one crate for full text search. The main app crate glues these together