Replies: 1 comment
-
The main benefit to using a workspace setup in this situation is that you do not need to recompile the If you want to add a fourth crate for server-only functionality that will be imported by server functions in It's purely a matter of individual preference. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm working with the Axum Workspace setup, which creates three members:
app
,frontend
, andserver
. I have a question about how to best organize my code across these crates.What is the intended purpose of each crate (
app
,frontend
,server
) in this setup? Specifically, what types of code should go into each?For instance, if the
server
crate is meant for server-only code, what kinds of code or functionality should be placed there? Are there examples of server-only code that would fit well in theserver
crate? Initially, I thought that server functions should reside in theserver
crate. However, it was mentioned in another discussion that theapp
crate is the typical place to put server functions because components need to call these functions, andserver
depends onapp
, but not the other way around.Currently, I'm placing everything inside the
app
crate because it simplifies things, but I realize this might negate the benefits of using a workspace setup. I’m interested in continuing with the workspace setup, even if it adds some complexity, as it forces me to confront issues that might be overlooked in a simpler setup.I would really appreciate any guidance or examples on how to properly structure code across these crates.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions