How to keep my domain model and diesel generated macros in two different crates? I need the models in my wasm crate in tauri leptos app

Currently I have my infrastructure (domain models + diesel code) in one crate, and a shared models crate which sits in between the wasm(tauri leptos) and the infrastructure crate. I am wondering if this is the right approach.

Is it possible to move the diesel generated macros to another crate? Or is there a better approach than the shared models crate.


I've also asked this question elsewhere:
(GitHub)/leptos-rs/leptos/discussions
(Reddit)/r/rust