Rust and AWS GameLift Server SDK

Hi!

I have a quick question: is it possible somehow to use anything except C++ and C# as a language for the AWS GameLift Custom Server? I see ready SDKs only for C++ and C#, so I don’t know, how can I choose other tech stacks. In my case, I want to use Rust instead. Should I reimplement from the scratch AWS GameLift Server SDK? Or just create C-bindings to C++ version of the SDK and then use these C bindings in my Rust project?

A little bit about my test project. Almost all stuff is the same with reference architecture from the following project: GitHub - aws-samples/aws-gamelift-sample: A simple full-stack game sample using GameLift and AWS services.

The only difference is that I want to use Rust instead of C++/C# on the server-side and in my case, I need a custom server (real-time server is not suitable in my case).

Thanks in advance!

P.S. Rusoto, Rust SDK for AWS API, doesn’t have any kind of AWS GameLift Server SDK APIs.

Gamelift does not vend server sdk in any other language apart from C++ or C#. Thus we currently have no server sdk support for rust.

Regarding using C-bindings within Rust project, Gamelift team has not tested this and confirmed it to work with gamelift. I would say it is worth a try if it reduces the effort significantly.

Ok, got it.

There is another idea - just rewrite a piece of AWS GameLift Server SDK in Rust. Unfortunately, they use Google Protobuf for their API but don’t provide original Protobuf files in their SDK - only already generated sources.

Is it possible to somehow ask AWS GameLift team to publish original Protobuf files? It will be much easier to implement with that own SDK in Rust.

The unofficial go sdk may help?

EDITED: hmm, it’s already generated file too. Maybe I need to ask the author of gomolift about providing the original sdk.proto file

I see at least one completely the same request 3 years ago: Can you please distribute sdk.proto instead of sdk.pb.h?

Still no any progress yet :frowning:

Hi. I’m author of gomelift, an unofficial GameLift ServerSDK for Go.

When I developed gomelift, I used this sdk.proto file.

He also provides an unofficial GameLift ServerSDK for Node.js.

I am also hoping that AWS will provide the sdk.proto file officially. This is because even if we use the official SDK as it is, it will be difficult to upgrade the protocol buffers library.

Thanks! :smile:

https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-integrate-gameserver.html
I haven’t tried it, so I can’t be sure, but by using GameLift FleetIQ instead of Managed GameLift, it may be possible to launch GameLift servers in all languages for which AWS SDKs are provided.
FleetIQ requires you to manage the startup and scaling of EC2 instances to a certain extent, so it may take more time than Managed GameLift, but it seems to be more flexible.

The official AWS SDK for Rust has just been released and does not yet include support for GameLift.

On the other hand, rusoto, the unofficial AWS SDK for Rust, seems to have support for GameLift, including FleetIQ feature.
https://docs.rs/rusoto_gamelift/0.46.0/rusoto_gamelift/

Thanks for sharing this! I will try to use it.

Since yesterday was released an official AWS SDK for Rust, I will create there an issue about AWS GameLift Server SDK for Rust and publishing Protobuf files. Who knows, maybe this time they will see and do something :slight_smile:

If anyone is interested - my version of AWS GameLift Server SDK for Rust is here: GitHub - ZaMaZaN4iK/aws-gamelift-server-sdk-rs

It’s under active testing, but I already successfully tested it with GameLift Local and on the real GameLift fleet. Any suggestions and contributions are welcome!

Also you can be interested in Docker images for building Rust for GameLift: GitHub - ZaMaZaN4iK/aws-gamelift-rust-buildimage: Docker image for building Rust application for AWS GameLift

4 Likes

Great and feel free to submit a PR to GitHub - favoyang/awesome-gamelift: A curated list of awesome packages, articles, and other cool resources from the GameLift community.

2 Likes