Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure project into workspace for better codebase separation #5

Merged
merged 5 commits into from
Dec 14, 2024

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Dec 13, 2024

Restructure the code base in order to support GTK-free-development to occur in when it is not required. All of the backend networking logic (the p2panda bits) have been split out into their own library/crate. This allows us to use whichever IDE setup we prefer and enjoy our usual tooling during development there. Flatpak builder is still required when building/running the complete app of course.

Concretely the restructure involves:

  • converting the project into a cargo workspace https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
  • introduce aardvark-app binary crate where all GTK development happens
  • introduce aardvark-node lib crate where non-GTK development can happen (moved backend p2panda code there, could also move some of the automerge logic later)
  • aardvark-app now depends on aardvark-node in it's Cargo.toml by path
  • update meson build files in order to account for this new structure

To run build and run the app we still open the root directory in flatpak builder as is currently the case.

@sandreae sandreae changed the title Workspace Restructure project into workspace for better codebase separation Dec 13, 2024
@sandreae sandreae marked this pull request as ready for review December 13, 2024 14:11
@adzialocha
Copy link
Member

Looking good! I think more "idiomatic" way to name the folders would be with an underscore (aardvark_app), but that's a detail.

@sandreae
Copy link
Member Author

Looking good! I think more "idiomatic" way to name the folders would be with an underscore (aardvark_app), but that's a detail.

Yeh, I thought so too, but then went with p2panda convention for consistency 😅

@adzialocha
Copy link
Member

Yeh, I thought so too, but then went with p2panda convention for consistency 😅

Sweet, that makes sense as well!

@swick
Copy link
Collaborator

swick commented Dec 13, 2024

Good to merge?

@bertob
Copy link
Collaborator

bertob commented Dec 14, 2024

I'm not qualified to review this, but no objections :)

@adzialocha adzialocha merged commit 058c9ca into main Dec 14, 2024
8 checks passed
@sandreae sandreae deleted the workspace branch December 14, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants