Skip to content
Merged

M0 #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ci
on: [push, pull_request]

jobs:
build-test:
strategy:
matrix:
os: [ubuntu-22.04, macos-14]
toolchain: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with: { toolchain: ${{ matrix.toolchain }} }
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -D warnings
- run: cargo test --all --all-features
- run: cargo build -p game --release

determinism:
needs: build-test
strategy:
matrix: { os: [ubuntu-22.04, macos-14] }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with: { toolchain: stable }
- uses: Swatinem/rust-cache@v2
- name: Replay golden record
run: |
cargo run -p repro_harness -- --replay repro/golden/run_01.rec.json --assert_hash repro/golden/run_01.hash
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
**/*.rs.bk
.DS_Store
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run game (debug)",
"type": "lldb",
"request": "launch",
"cargo": { "args": ["run", "-p", "game"] },
"cwd": "${workspaceFolder}"
},
{
"name": "Run game (release)",
"type": "lldb",
"request": "launch",
"cargo": { "args": ["run", "-p", "game", "--release"] },
"cwd": "${workspaceFolder}"
}
]
}
7 changes: 7 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"version": "2.0.0",
"tasks": [
{ "label": "cargo: build all", "type": "shell", "command": "cargo build --all -q", "problemMatcher": ["$rustc"] },
{ "label": "cargo: run game", "type": "shell", "command": "cargo run -p game", "problemMatcher": ["$rustc"] }
]
}
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Etiquette
- Feature branches; merge via PR with green CI.
- No TODOs without a linked issue.
- Changes to economy/saves/rulepacks must update tests and changelog.

## Performance budgets
- Gameplay ≤ 6 ms CPU; GPU ≤ 8/16/33 ms for 120/60/30 FPS tiers.

## Determinism
- Fixed timestep; DetRng only; stable system sets/order.
Loading