Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust server #131

Merged
merged 70 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1d4acf4
slimmed down project for geckos performance test
snuffysasa Oct 29, 2020
55fbd77
switched to uWS implementation
snuffysasa Oct 29, 2020
a0ef6af
cleanup websocket slim implementation
snuffysasa Oct 29, 2020
53e48a8
add yarn lock to gitignore
Tarnadas Oct 29, 2020
50651de
fix input manager prevent default on control keys
Tarnadas Oct 29, 2020
67d7e6f
initial rust ws server commit
Tarnadas Oct 29, 2020
2182013
protobuf build rust
Tarnadas Oct 29, 2020
729fc98
process player data
Tarnadas Oct 30, 2020
0c7c502
ws server and session separation
Tarnadas Nov 2, 2020
bc8c1e9
fix todos
Tarnadas Nov 2, 2020
5d884c6
changes to proto for unified message
Tarnadas Nov 4, 2020
2473b7e
fix message receiving
Tarnadas Nov 5, 2020
fbeb916
serve without node ws
Tarnadas Nov 5, 2020
6c9ef2e
fix compile issue
Tarnadas Nov 5, 2020
071ccfe
cleanup dependencies
Tarnadas Nov 5, 2020
b0f7d64
update dependencies
Tarnadas Nov 5, 2020
9c7a5a6
Merge pull request #65 from Tarnadas/MMO_benchmark_websockets
sm64js Nov 5, 2020
4cc0e4c
server should always force the channel_id
snuffysasa Nov 8, 2020
f725fd0
setup max draw distance check for remote marios
snuffysasa Nov 8, 2020
4965406
Merge branch 'MMO_benchmark_rust' of https://github.com/sm64js/sm64js…
snuffysasa Nov 9, 2020
75bb9a5
setup client and server to measure latency, rust server still needs t…
snuffysasa Nov 9, 2020
566fc8f
handle ping message and zlib deflation
Tarnadas Nov 10, 2020
c424f1d
Merge pull request #111 from Tarnadas/master
sm64js Nov 10, 2020
33f6ffe
make sure connected before test ping
snuffysasa Nov 10, 2020
0723e65
setup permissive server
snuffysasa Nov 11, 2020
f83ab98
set ip address correctly and number of players fix
snuffysasa Nov 11, 2020
be75e7e
update rust server to force correct channel id
snuffysasa Nov 11, 2020
a0fef8c
remove unused dependency
snuffysasa Nov 11, 2020
302519b
switched flate2 to zlib?
snuffysasa Nov 11, 2020
dfbb3e6
docker publish
Tarnadas Nov 11, 2020
e199ec6
cargo fmt
Tarnadas Nov 11, 2020
7fc8299
fix docker username
Tarnadas Nov 11, 2020
318fbcb
Merge pull request #117 from Tarnadas/master
sm64js Nov 11, 2020
eb28898
ci: remove unused steps
Tarnadas Nov 12, 2020
dd2cc11
ci: set trigger
Tarnadas Nov 12, 2020
9d777bf
serve static files via rust
Tarnadas Nov 12, 2020
8ef38fd
update dependencies
Tarnadas Nov 12, 2020
5e5faa9
build docker assets container
Tarnadas Nov 12, 2020
c489be1
change port
Tarnadas Nov 12, 2020
198cf70
ci: add caching
Tarnadas Nov 12, 2020
3c2c283
setup sccache
Tarnadas Nov 12, 2020
f21abb3
ci: run mount as sudo
Tarnadas Nov 12, 2020
d8ebfaf
ci: include self trigger
Tarnadas Nov 12, 2020
7c857cb
ci: fix sccache
Tarnadas Nov 12, 2020
cc419d6
fix websocket address
Tarnadas Nov 13, 2020
655f45f
ci: run always
Tarnadas Nov 13, 2020
cbcd61e
slab parking lot and rayon
Tarnadas Nov 16, 2020
aace6b3
use dashmap
Tarnadas Nov 16, 2020
cb8380d
timeout client when not sending data
Tarnadas Nov 16, 2020
628b69f
Merge remote-tracking branch 'origin/MMO' into MMO_benchmark_rust
Tarnadas Nov 17, 2020
8d04d5e
fix merge errors
Tarnadas Nov 17, 2020
8922516
remove cross env
Tarnadas Nov 17, 2020
62f8228
fix line ending
Tarnadas Nov 17, 2020
9b825b1
fix stats object
Tarnadas Nov 17, 2020
4c982c9
enable player interaction?
Tarnadas Nov 17, 2020
94d616d
move connectedmsg to protobuf
Tarnadas Nov 17, 2020
91b7f3f
remove numonline
Tarnadas Nov 18, 2020
3850503
ping msg protobuf
Tarnadas Nov 18, 2020
cc8de56
chat via protobuf
Tarnadas Nov 19, 2020
c3c677f
fix chat bubbles
Tarnadas Nov 19, 2020
18a4c12
wip: skins via protobuf
Tarnadas Nov 23, 2020
ee75b0d
Merge remote-tracking branch 'origin/MMO' into MMO_benchmark_rust
Tarnadas Nov 23, 2020
d005ae6
remove moment
Tarnadas Nov 23, 2020
fcee6f2
fix skin condition
Tarnadas Nov 24, 2020
d6d9233
fix cap state
Tarnadas Nov 24, 2020
df0f517
add testdb to gitignore
Tarnadas Nov 24, 2020
9c62f52
remove logging
Tarnadas Nov 24, 2020
394888e
fix rust server compilation
Tarnadas Nov 24, 2020
56c20f0
handle chat messages
Tarnadas Nov 24, 2020
761ba28
Merge remote-tracking branch 'origin/MMO' into MMO_benchmark_rust
Tarnadas Nov 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/dist
/target
37 changes: 37 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"

name: Rust Server Audit

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
name: Checkout

- uses: actions-rs/toolchain@v1
name: Install Toolchain
with:
profile: minimal
toolchain: nightly-2020-10-23
override: true

- uses: actions-rs/cargo@v1
name: Install Cargo Tools
with:
command: install
args: cargo-audit

- uses: actions-rs/cargo@v1
name: Audit
with:
command: audit
112 changes: 112 additions & 0 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
on: [push, pull_request]

name: Rust Server Test & Publish

jobs:
test:
runs-on: ubuntu-latest
# TODO run Rust stuff conditionally
# push:
# paths:
# - "rust-server/**/*"
# - ".github/workflows/test-and-publish.yml"
# pull_request:
# paths:
# - "rust-server/**/*"
# - ".github/workflows/test-and-publish.yml"

env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 500M
SCCACHE_DIR: /home/runner/.cache/sccache
SCCACHE_IDLE_TIMEOUT: 0

steps:
- uses: actions/checkout@v2
name: Checkout

- uses: actions-rs/toolchain@v1
name: Install Toolchain
with:
profile: minimal
toolchain: nightly-2020-10-23
override: true
components: rustfmt, clippy

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
/home/runner/.cache/sccache
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install sccache
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: 0.2.13
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Start sccache server
run: |
sccache --start-server

- uses: actions-rs/cargo@v1
name: Check
with:
command: check

# TODO needs tests
# - uses: actions-rs/cargo@v1
# name: Test
# with:
# command: test

- uses: actions-rs/cargo@v1
name: Fmt
with:
command: fmt
args: -- --check

- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: -- -D warnings

publish:
# this needs to be changed, if the Rust server should be published from a different branch
if: github.ref == 'refs/heads/MMO_benchmark_rust'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
/home/runner/.cache/sccache
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup cache
run: |
mkdir sccache
sudo mount -o bind /home/runner/.cache/sccache sccache

- name: Deploy to Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: bash publish-rust-server.sh
continue-on-error: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
dist
testdb.json
*lock.json
yarn.lock
node_modules
/target
testdb.json
.vs*
.DS_Store
extractTools/.assets-local.txt
Expand Down