the runtime framework for the NEVR service.
This codebase defines the runtime API and protocol interface used by NEVR
It is tightly integrated with components of Nakama, and is structured similarly to the heroiclabs/nakama-common
repository.
The code is broken up into packages for different parts:
api
- The request/response messages used with the GPRC and in some of the real-time API.rtapi
: The runtime API definitions, including the frame structure and connectivity statistics.gameapi
: The game-engine's HTTP API/session
and/user_bones
endpoints.common
: Shared utilities and types used across the codebase.
Protocol Buffer files have already been generated and are included in the repository. To use them in your project:
-
Go: Import the generated Go packages directly in your project. Example:
import "github.com/echotools/nevr-common/v3/api"
-
Python: Use the generated
.py
files in your Python project. Example:from api import api_pb
-
CSharp: Reference the generated
.cs
files in your C# project. Example:using Api;
No additional code generation is required unless you modify the .proto
files.
The codebase uses Protocol Buffers. The protoc toolchain is used to generate source files which are committed to the repository to simplify builds for contributors.
To build the codebase and generate all sources use these steps.
-
Install the Go toolchain and protoc toolchain.
-
Install the protoc-gen-go plugin to generate Go code.
go install "google.golang.org/protobuf/cmd/protoc-gen-go"
To generate all source files with Make, run:
./build.sh
To generate all Go source files, run:
env PATH="$HOME/go/bin:$PATH" go generate -x ./...
These steps have been tested with the Go 1.24 toolchain. Earlier Go toolchain versions may work though YMMV.