Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LIU9293/rust-2048
Learn rust by coding a 2048 game use dioxus
https://github.com/LIU9293/rust-2048
Last synced: about 1 month ago
JSON representation
Learn rust by coding a 2048 game use dioxus
- Host: GitHub
- URL: https://github.com/LIU9293/rust-2048
- Owner: LIU9293
- License: mit
- Created: 2023-06-25T16:43:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-12T13:03:31.000Z (over 1 year ago)
- Last Synced: 2024-09-24T16:10:13.797Z (5 months ago)
- Language: Rust
- Size: 237 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-list - LIU9293/rust-2048 - 2048?style=social"/> : Learn rust by coding a 2048 game use dioxus. (GUI)
- awesome-rust-list - LIU9293/rust-2048 - 2048?style=social"/> : Learn rust by coding a 2048 game use dioxus. (GUI)
README
## 2048 Game in Disxus
It's a demo application for me to figure out if I can use rust/dioxus in production code, this codebase contains a frontend client that can compiled to Web(wasm) and Desktop, a simple rust server to handle some basic API logic and some shared components between client and server.
Live Demo -> https://rust-2048.vercel.app/
API -> https://rust-2048-api.onrender.com/leaderboard
### Features in this application
- [x] Use tailwind and daisy css for styling
- [x] Handle Dark / light theme
- [x] Try to inplenment i18n use fermi state
- [x] Access cookies / localstorage
- [x] Build web and native app
- [x] A simple server to record user progress
- [x] Leaderboard### Test and run
```
1. Run server
cargo run -p server2. Run client
// web
dioxus serve --platform web// desktop, desktop router is not working, try to exclude router for desktop
dioxus serve --platform desktop
```### Target
* Cross platform
* Full stack in rust, with a simple backend server
* Platform support
- [x] Web
- [x] Native MacOS
- [ ] Mobile ??
- [ ] Terminal ??### Progress
- [x] Basic UI
- [x] Basic move logic
- [x] Success or fail
- [x] How to deploy
* Web -> scripts/build-web.sh
* Desktop -> scripts/build-desktop.sh
- [x] Log the highest score and the total score
- [x] CI/CD
* Web -> Vercel, done
* Server -> Render.com
* Desktop?### Server
- [x] Record game progress
- [x] Record progress for multiple users
- [x] LeaderboardGithub
-
https://github.com/LIU9293/rust-2048/