Open Source Bytes: Rust Games ๐ฎ
Welcome to Open Source Bytes, a collection of fun and educational Rust games! ๐ฆ
Play the Bytes on here!
๐TL:DR
- Bytes are Rust coding games designed for pure Rust learning! ๐
- We love Rust and want everyone else to learn. What better way to learn than by reading Rust code and guessing what bugs there are? ๐
- We want you to contribute your own Bytes to make the Rust challenges even more fun! ๐ค Be creative!
๐ค Contribute
Build small Rust CLI projects! Just make sure you follow these rules:
- Be unique ๐
- Code must compile! โ
- Add Tests to your code ๐งช
- Make it short and sweet! We want other students to be able to read and understand these in one go ๐ช
๐ก Example Bytes
Here are some ideas to get you started. Each Byte is designed to be a small, self-contained project that is easy to understand and work with:
- Banking System: Manage accounts, transactions, balances and interest rates.
- AI Coffee Shop: Utilize LLM that can take customer orders through the CLI.
- Weather Forecasting: Input location and get a simulated weather forecast.
- Explore more Byte Ideas! Feel free to take on any idea! Just leave a comment saying, "I'll work on this!" You'll have one week to complete it once you claim an idea.
๐ Getting Started
If you have an idea for a new Byte and want to discuss it before writing code, you can start by opening an issue:
-
Open an Issue for Brainstorming
- Navigate to the Issues tab.
- Click on New Issue and select the Brainstorming label.
- Describe your idea in detail to allow others to provide feedback and suggestions.
- See an example of a brainstorming issue here
-
Collaborate and Refine
- Engage with the community by responding to comments.
- Refine your idea based on the feedback received.
-
Proceed to Implementation
- Once your idea is well-defined, follow the steps below to build your Byte.
๐งโ๐ป How to Build a Byte
Fork and Clone the Repository
- Fork the repository: https://github.com/coreyja/crowd-source-bytes
- Clone your forked repository:
git clone https://github.com/YOUR_USERNAME/crowd-source-bytes.git
cd crowd-source-bytes
- Create a new branch with the following branch name style:
git checkout -b <your-name>/main/<name-of-byte>-byte
Create a New Rust Project
- Create a new Rust project for your byte:
cargo new <name-of-your-byte>
- Add the name of your project to the
members
list in the root Cargo.toml
file. This sets up a Cargo workspace with all the packages together! More info about workspaces here: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
- Navigate to your new byte project:
cd <name-of-your-byte>
- Open
src/main.rs
and write your code for your byte.
๐ Prepare Your Contribution
Submit a Pull Request
- Commit your changes:
git add .
git commit -m "Add <name-of-your-byte> Byte"
- Push your changes to your fork:
git push origin <your-name>/main/<name-of-byte>-byte
- Write a description of your Byte and instructions on how to run it locally.
- Add test cases to the
tests/
directory.
- Create a test plan for your Byte, including:
- A description of the test plan
- Expected output
- Leave comments in the diff indicating where you want the "bug" to be ๐
- Run
cargo fmt
to make sure your code is formatted according to Rust formatting rules
- Run
cargo clippy
to make sure it passes all the lints defined. Clippy is also a great tool for learning new tips and tricks in Rust!
- Run
cargo test
and make sure it passes all the tests you wrote
- Submit your Pull Request for review.
Remember, the goal is to create fun, educational challenges for the Rust community! ๐
๐ Join the Fun
Start coding, start learning, and most importantly, have fun with Rust! ๐
Happy coding, Rustaceans! ๐ฆ
๐ค Connect with Us
Join our Discord community to discuss ideas, get support, ask questions, and get guidance on launching your Byte! Coreyja Club