A online game of french tarot in rust / webassembly
The project is playable but the code (and the interface) is not pretty. I am learning rust with this project, don't hesitate to make pull requests.
Compile application:
make
Start server:
./dist/webtarot_server -p 8000 -d dist/public
then open http://127.0.0.1:8000/.
If you want to see logs:
RUST_LOG=info ./dist/webtarot_server -p 8000 -d dist/public
Start server and client in development mode:
make client
make server
and open your browser to http://127.0.0.1:8001/
The container
directory contains an example of a nix configuration.
- build it with
make local
- get the ip address of the container :
machinectl
, which output something like this :
MACHINE CLASS SERVICE OS VERSION ADDRESSES
webtarot container systemd-nspawn nixos 23.05 10.233.2.2…
Then browse to the ip firefox http://10.233.2.2
Requirements:
- gettext
- xtr (
cargo install xtr
) - cargo-i18n (
cargo install cargo-i18n
, tested with cargo-i18n v0.2.10)
Edit target languages in i18n.toml and webtarot_client/i18n.toml
Generate translation files: cd webtarot_client && cargo i18n
(you can ignore error messages about parent crate)
Translate strings in webtarot_client/i18n/po/your_language/
Compile translations
cd webtarot_client
cargo i18n
cargo build
- the initial code for the base game server and yew (webassembly) stuff was taken from https://github.com/mitsuhiko/webgame
- the card game models where inspired by https://github.com/gyscos/libcoinche
- the cards SVG images come from https://github.com/tarotclub/tarotclub