2 releases
0.1.1 | Mar 31, 2024 |
---|---|
0.1.0 | Mar 28, 2024 |
#791 in Game dev
51 downloads per month
1MB
647 lines
原文在这里
这里只是提供自己学习
🎯 What is it?
This repository hosts the Rust Sokoban book and source code used in the book. It's using mdbook.
🏃 How to?
Host the book locally
If not already done, install mdbook.
$ cargo install mdbook
Serve the book and navigate to http://localhost:3000/ in your local browser.
$ mdbook serve
Run the code locally
$ cd code/rust-sokoban-c01-01
$ cargo run --release
💪 Contribute
Add a new section
- Copy the latest
code/rust-sokoban-x
folder tocode/rust-sokoban-x+1
- Add the code changes of the topic you want to illustrate, try to keep each section self contained and relatively simple to grasp
- Make sure the code compiles (ideally without warnings)
- Add a new entry in
src/SUMMARY.md
- each md file should be in the formatcxx-yy-text.md
- Fill the markdown in and use code references with line numbers pointing to the
code/rust-sokoban-x+1
folder - Add a gif towards the end of the new section to showcase the new feature - grab a screen recording and then convert it to a gif (I use ffmpeg for this -
ffmpeg -i Screen_Recording.mov -r 60 -f gif - > moves.gif
) - If you add a directory tree listing, use tree -
tree --dirsfirst -I target
- Create a PR and wait for the 👏 🎉
Create an issue
Have a look in the issues list of any duplicates, if you can't find anything create a new one!
Help with a translation
- Make a copy of the books/en_US folder with the new translation ISO code (for example fr_FR, see list)
- Modify the language in book.toml
- Translate SUMMARY.md first
- Translate each chapter/sub-chapter, try to not modify any images/sounds/videos or any of the book structure
- Feel free to create a draft pull request as soon as you have a few pages translated, this will make other contributors aware of the work
🚗 License
MIT
Dependencies
~22–54MB
~1M SLoC