My solutions to the Shuttle.rs Christmas Code Hunt 2023
This repo uses just to run common commands.
You'll need to install the following in order to use the just
commands:
- cargo-shuttle - the shuttle.rs CLI
- cargo-watch - runs commands when files change
- cch23-validator - official challenge validator
With everything installed, you can run the following commands:
# Compile, run, and test endpoints
just test
# Watch for file changes and run `just test` as needed
just watch
Each challenge day has a separate file in ./src/.
Each of these files exposes a get_routes() -> axum::Router
function, including all of the endpoints for that day.
These routes all include their day's path number, as required by Shuttle.rs CCH.
./src/main.rs uses all of these get_routes
functions to build the complete Router
, and has the #[shuttle_runtime::main]
attribute applied.