Want to implement a feature or help solving that nasty bug? You are at the right page - this document will guide you through setting up everything you may need to get this project up and running.
- Clone this project using your preferred tools:
# Regular git clone
git clone https://github.com/fatfingers23/at_2048.git
# Clone using SSH (the most secure way)
git clone git@github.com:fatfingers23/at_2048.git
# Clone using GitHub CLI (the most convenient way)
gh repo clone fatfingers23/at_2048
Now, you have two choices:
- Install Rust, if you haven't already
- Add Wasm target:
rustup target add wasm32-unknown-unknown - Install npm
- Install project dependencies using
npmandcargo:
cargo install trunk wasm-bindgen-cli- Go to the
client_2048directory:cd at_2048/client_2048 - Run
npm install
- Install Determinate Nix (skip if you are on NixOS with flakes enabled)
cd at_2048direnv allow- Make a cup of tea while dependencies are being downloaded
- Once it's done, (dependencies loading, not tea)
cd client_2048 npm install
After that, it might be a good idea to run nix flake update and see if
flake.lock file at the project root directory is changed. This way, you'll
ensure you have the latest packages installed.
Open the client_2048 directory and run trunk serve. You should see something
like this:
Done in 151ms
2025-05-05T18:05:39.718398Z INFO applying new distribution
2025-05-05T18:05:39.720532Z INFO ✅ success
2025-05-05T18:05:39.720588Z INFO 📡 serving static assets at -> /
2025-05-05T18:05:39.720771Z INFO 📡 server listening at:
2025-05-05T18:05:39.720777Z INFO 🏠 http://127.0.0.1:8080/
2025-05-05T18:05:39.720782Z INFO 🏠 http://[::1]:8080/
2025-05-05T18:05:39.720864Z INFO 🏠 http://localhost.:8080/
Visit http://localhost:8080, traverse the project files, and go on, do some hacking!
Go to this repository's
page, fork it,
save your changes using git commit, then push it:
git remote add github git@github.com:<YOUR_USERNAME>/at_2048.git # only needed once
git push github <YOUR_BRANCH_NAME>After that, come back to this repository and GitHub will propose you to open the pull request. Do it!
git checkout main
git pullBoom! Your codebase is now straight from the oven again.
Feel free to DM or @ me on Bluesky, or open a new issue if you encountered a problem.