https://github.com/mfurquimdev/try-bevy
Follow Bevy getting started book - a game engine written in rust.
https://github.com/mfurquimdev/try-bevy
bevy bevy-engine getting-started rust
Last synced: 3 months ago
JSON representation
Follow Bevy getting started book - a game engine written in rust.
- Host: GitHub
- URL: https://github.com/mfurquimdev/try-bevy
- Owner: mfurquimdev
- Created: 2023-11-20T00:25:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T04:10:08.000Z (over 2 years ago)
- Last Synced: 2025-07-19T16:30:05.812Z (12 months ago)
- Topics: bevy, bevy-engine, getting-started, rust
- Language: Rust
- Homepage: https://bevyengine.org/learn/book/introduction/
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Trying Bevy (Rust Game Engine)
Code following [Bevy Book](https://bevyengine.org/learn/book/getting-started/)
## Add Bevy
Add `bevy` as a dependency
```bash
cargo add bevy
```
## Optimization
Install a faster linker and add configuration files for improving speed.
### Install lld
Install `lld` - a faster linker
```bash
sudo pacman -S lld
```
### Add to files
**Cargo.toml**
```toml
[dependencies]
bevy = { version = "0.12.0", features = ["dynamic_linking"] }
# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
[profile.dev.package."*"]
opt-level = 3
```
**rust-toolchain.toml**
```toml
[toolchain]
channel = "nightly"
```
**config.toml**
```toml
# NOTE: For maximum performance, build using a nightly compiler
# If you are using rust stable, remove the "-Zshare-generics=y" below.
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
[target.x86_64-apple-darwin]
rustflags = [
"-C",
"link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
"-Zshare-generics=y",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C",
"link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld",
"-Zshare-generics=y",
]
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=n"]
```
## Running
Run
```bash
cargo run
```
It will take a while, since it's compiling a whole game engine.
Subsequent compiles will be iterative and faster.
# Bevy Examples
Continuing Bevy learning with [Bevy Examples](https://github.com/bevyengine/bevy/blob/latest/examples)
## Sprite Animation
Showing chicken running and plants growing using [sprite sheet](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) as reference.