Other languages
SpatialEngine exposes its Protocol Buffers API over gRPC. Any language with a gRPC implementation can use it. The native engine supports gRPC server reflection, so tools can discover its services and message definitions while it is running.
Discover and call a service
Install grpcurl, then use the gRPC address printed by
your running native engine. The default local address is localhost:50051.
grpcurl -plaintext localhost:50051 list
grpcurl -plaintext localhost:50051 describe spatialengine.v1.Root
grpcurl -plaintext -d '{"message":"Hello"}' localhost:50051 spatialengine.v1.Root/PrintThe last command calls the echo statement using reflection to discover its request and response
types. It needs no SDK or local schema files.
-plaintext selects the local engine’s unencrypted gRPC listener.
Generate a client
Export a service’s schema and its imports as a compiled descriptor set:
grpcurl -plaintext -protoset-out engine.protoset localhost:50051 describe spatialengine.v1.RootThen run your language’s protobuf compiler and gRPC plugin against that descriptor set.
For example, with protoc and grpc_cpp_plugin from a
C++ gRPC installation:
mkdir -p generated
protoc --descriptor_set_in=engine.protoset --cpp_out=generated --grpc_out=generated \
--plugin=protoc-gen-grpc="$(command -v grpc_cpp_plugin)" \
spatialengine/v1/root.proto spatialengine/v1/options.protoThis generates C++ message classes and a spatialengine::v1::Root service with a NewStub client
factory. See the gRPC C++ client guide
for connecting that stub to a channel.
The filenames select definitions inside the descriptor set; no local .proto files are needed.
Other languages use the same schema with their own compiler plugins.
Export the complete source schema below when you need files for every service.
Reflection supplies the schema. The language’s compiler generates the source code. Generated clients expose protobuf requests and responses; the Python and TypeScript SDKs add language-specific argument handling and return values.
Export without connecting
The native executable can also export its complete schema and exit:
SpatialEngine --emit-proto ./protoUse this when preparing a client without a running server. The Protobuf reference documents service methods, request and response messages, and enums.