6 stable releases
1.0.5 | Nov 17, 2020 |
---|---|
1.0.4 | Nov 16, 2020 |
1.0.0 | Nov 15, 2020 |
#744 in Games
22 downloads per month
34KB
617 lines
game
There is a button that you can press every day to receive a point. Compete with your friends to see who can get the most points.
what's the technical implementation?
- uses Rocket to serve webpages
- uses tera for templating
- uses a sled database
- uses bcrypt to hash/salt passwords
- pulls some trickery in order to embed static files and templates directly into binary:
- uses rust-embed to embed static/template directories into the binary
- unzips static/template directories to a temporary directory
- creates a new Rocket config (so any Rocket.toml or env vars still get parsed) which grabs templates from the temp dir
...why?
In the first iteration of this game I wanted to throw together some fun program in one night. Then, some people actually started playing it. The old code was super unstable and difficult to change because it was thrown together, and I wanted to learn Rust, so I decided to rewrite it.
Dependencies
~24–36MB
~584K SLoC