Skip to content
Open
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
48 changes: 40 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: cargo test

- name: Builtin game tests
run: cargo test --features builtin-games
run: cargo test --features builtin

- name: Physics tests
run: cargo test --features physics
Expand All @@ -29,16 +29,16 @@ jobs:
run: cargo test --features parallel

- name: Builtin physics tests
run: cargo test --features "builtin-games physics"
run: cargo test --features "builtin physics"

- name: Rendered builtin tests
run: cargo test --features "render builtin-games physics"
run: cargo test --features "render builtin physics"

- name: Render framework check
run: cargo check --features render

- name: Rendered builtin check
run: cargo check --features "render builtin-games"
run: cargo check --features "render builtin"

- name: CLI check
run: cargo check --bin gameengine --features cli
Expand All @@ -53,13 +53,45 @@ jobs:
run: cargo check --target wasm32-unknown-unknown --features physics

- name: WASM rendered builtin check
run: cargo check --target wasm32-unknown-unknown --features "render builtin-games physics"
run: cargo check --target wasm32-unknown-unknown --features "render builtin physics"

- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly

- name: Rustdoc coverage gate
run: |
cargo +nightly rustdoc --all-features -- -Z unstable-options --show-coverage --output-format json > /tmp/rustdoc_cov.json
python - <<'PY'
import json, sys
files = json.load(open('/tmp/rustdoc_cov.json'))
with_docs = sum(v.get('with_docs', 0) for v in files.values())
total = sum(v.get('total', 0) for v in files.values())
pct = 100.0 if total == 0 else (with_docs * 100.0 / total)
print(f"Rustdoc documented items: {with_docs}/{total} ({pct:.2f}%)")
if with_docs != total:
print('Rustdoc coverage gate failed (<100.0%).', file=sys.stderr)
sys.exit(1)
PY

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo +stable clippy --all-targets --all-features -- -D warnings

- name: Install pinned Verus release
run: |
curl -fsSL "https://github.com/verus-lang/verus/releases/download/release%2F0.2026.03.28.3390e9a/verus-0.2026.03.28.3390e9a-x86-linux.zip" -o /tmp/verus.zip
unzip -q /tmp/verus.zip -d /tmp
rm -rf ./verus_binary
mv /tmp/verus-x86-linux ./verus_binary
chmod +x ./verus_binary/verus

- name: Install Verus-required Rust toolchain
run: rustup toolchain install 1.94.0-x86_64-unknown-linux-gnu

- name: Verus model checks
run: REQUIRE_VERUS=1 bash scripts/run-verus.sh

- name: Bench compile
run: cargo bench --no-run --features "builtin-games physics"
run: cargo bench --no-run --features "builtin physics"

kani:
runs-on: ubuntu-latest
Expand All @@ -72,4 +104,4 @@ jobs:
with:
kani-version: "0.67.0"
command: bash
args: "scripts/run-kani.sh"
args: "-lc 'VERIFICATION_MODE=kani-only scripts/run-verification.sh'"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target
/verus_binary
/infotheory
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gameengine"
version = "0.1.2"
version = "0.2.0"
edition = "2024"
autobins = false
license = "ISC"
Expand All @@ -14,8 +14,8 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
[features]
default = []
physics = []
builtin-games = []
cli = ["builtin-games"]
builtin = []
cli = ["builtin"]
parallel = ["dep:rayon"]
render = [
"dep:bytemuck",
Expand Down Expand Up @@ -51,10 +51,20 @@ criterion = { version = "0.5.1", default-features = false, features = ["cargo_be

[[bin]]
name = "gameengine"
path = "src/main.rs"
path = "src/bin/gameengine.rs"
required-features = ["cli"]

[[bench]]
name = "step_throughput"
harness = false
required-features = ["builtin-games"]
required-features = ["builtin"]

[[bench]]
name = "kernel_hotpaths"
harness = false
required-features = ["builtin"]

[[example]]
name = "perf_probe"
path = "examples/perf_probe.rs"
required-features = ["builtin"]
Loading
Loading