Skip to content

Commit 77a001b

Browse files
committed
initial upload
0 parents  commit 77a001b

23 files changed

Lines changed: 3816 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
# Cancel superseded runs for the same ref so rapid pushes don't pile up.
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
name: Test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Cache cargo registry and build
28+
uses: Swatinem/rust-cache@v2
29+
30+
# The client crate links macroquad/miniquad (windowing + GL) and ALSA
31+
# (audio), which need these system libraries to compile on Linux.
32+
- name: Install system dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y --no-install-recommends \
36+
pkg-config libasound2-dev libx11-dev libxi-dev libgl1-mesa-dev
37+
38+
# Compiles every target (libs, bins, unit tests, benches, and the
39+
# headless example) so nothing is left unchecked, without running benches.
40+
- name: Build all targets
41+
run: cargo build --workspace --all-targets
42+
43+
- name: Run tests
44+
run: cargo test --workspace
45+
46+
bench:
47+
name: Benchmarks
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
53+
- name: Install Rust toolchain
54+
uses: dtolnay/rust-toolchain@stable
55+
56+
- name: Cache cargo registry and build
57+
uses: Swatinem/rust-cache@v2
58+
59+
# The `shared` crate has no graphical dependencies, so no system packages
60+
# are required for the benchmark suite.
61+
- name: Run benchmarks
62+
run: cargo bench -p shared

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target
2+
**/*.rs.bk
3+
Cargo.lock.bak
4+
.DS_Store

.gitinfo

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://git.zue.dev/gitinfo/plain/gitinfo.schema.json",
3+
"root": "https://github.com/zuedev/rust-authoritative-netcode-demo",
4+
"description": "A server-authoritative multiplayer netcode demo in Rust showcasing client-side prediction, server reconciliation, entity interpolation, lag compensation, and delta-encoded snapshots.",
5+
"tags": [
6+
"rust",
7+
"netcode",
8+
"multiplayer",
9+
"game-networking",
10+
"gamedev"
11+
],
12+
"license": "MIT",
13+
"ci": "https://github.com/zuedev/rust-authoritative-netcode-demo/actions",
14+
"issues": "https://github.com/zuedev/rust-authoritative-netcode-demo/issues"
15+
}

0 commit comments

Comments
 (0)