-
Install the latest stable Rust toolchain
-
Checkout this repository and change directory to the root
-
cargo build
This crate is compatible with 4.0.2 AWS GameLift Server SDK. We support the latest stable Rust version.
If you find any bug, missed functionality or just want to share any feedback - feel free to open an issue. Will be wonderful, if you create a PR - it makes my life much easier.
You can test the library directly on AWS GameLift service, but it can be too slow and expensive for you. I suggest to you official AWS GameLift Local. Unfortunately, for now AWS doesn’t provide any official Docker image for the local server, so you can use my Docker image. The original repo is here. Just run your local server and run any application with the SDK (any example is fine too).
Now there are 2 official AWS GameLift Server SDK versions: C and C#. They look pretty similar, but under the hood they work differently. Even versioning is different for them. At the moment of writing this, C SDK had 3.4.1 version, C# had 4.0.2 version and they had different Protobuf backward-compatible schema.
C++ SDK uses 2 Socket.io connections to the AWS GameLift Server process on a node (this process’s name is AuxProxy
). The first connection is used for sending requests from the SDK to AuxProxy and receiving the answers (request-response pattern). The second connection is used for receiving events from AuxProxy.
C# SDK uses another approach. It uses HTTP protocol for implementing request-response pattern and raw WebSocket connection for receiving the events from AuxProxy.
Initially this library (AWS GameLift Server SDK in Rust) tried to use the C++ approach with 2 Socket.io connections. Unfortunately, I’ve failed to implement it properly for several reasons. Request-response pattern with Socket.io looks ugly. Socket.io library in Rust is too young and unstable from my point of view (I’ve tried to use rust-socketio).
So the way with HTTP + WebSocket was chosen as a primary design - I just like it more, and it was easier for me to properly implement the SDK in this way. If you have any concerns about usability, efficiency or anything else - please let me know!
AWS GameLift Server SDK uses Protobuf 3 protocol. Unfortunately, AWS doesn’t provide officially original Protobuf files yet. So we use reverse-engineered .proto
files from this repository: Protobuf schema. Since the original repo can be outdated, I also maintain my own fork (any help with maintaining is appreciated a lot): Another Protobuf schema.
If you are looking for AWS GameLift SDK (without Server word) - this crate is not for you. Please use rusoto, or an official AWS Rust SDK (at the moment of writing this GameLift is not supported in this SDK).
-
AWSGAMETECH forum thread about differences between SDK and semi-official Protobuf schema
-
Unofficial NodeJS AWS GameLift Server SDK