From e23587b698b10f73065818ad385bb4683b4fd23b Mon Sep 17 00:00:00 2001 From: lukas0008 Date: Wed, 21 Aug 2024 16:30:38 +0200 Subject: [PATCH] Create a basic structure guide --- CONTRIBUTING.md | 4 ++++ STRUCTURE.md | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 STRUCTURE.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 357ab14d..9ad4b7ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,10 @@ There are several ways you can contribute to Pumpkin: Ensure your code adheres to the project's coding style guidelines (if any). Write clear and concise commit messages that describe your changes. +### Project Structure + +Before contributing, it would be helpful to get to know the project structure, for further information, visit [STRUCTURE.md](STRUCTURE.md) + ### Additional Information We encourage you to comment on existing issues and pull requests to share your thoughts and provide feedback. diff --git a/STRUCTURE.md b/STRUCTURE.md new file mode 100644 index 00000000..52f2208f --- /dev/null +++ b/STRUCTURE.md @@ -0,0 +1,17 @@ +# Project Structure + +## Overview + +Pumpkin is split into multiple crates, thus having a set project structure between contributors is essential. + +## Pumpkin-Core + +The core crate has some special rules that only apply to it: + +- It may not depend on any other pumpkin crate +- There may not be any files directly under src/, except for the mod.rs file (this is to help with organisation) + +## Other crate rules + +- [`pumpkin-protocol`](/pumpkin-protocol/) - contains definitions for packet types **and** their serialization (be it through serde, or manually implementing `ClientPacket`/`ServerPacket`), only the `pumpkin` crate may depend on this +- `pumpkin-macros` - similarly to `pumpkin-core`, it may not depend on any other pumpkin crate