
Croupier C++ SDK
高性能 C++ SDK,用于 Croupier 游戏函数注册与虚拟对象管理
🏗️ 虚拟对象注册
完整的对象和函数组注册机制,支持四层组件化架构
📡 gRPC 集成
真实的 Protobuf + gRPC 通信,通过 vcpkg 自动依赖管理
🔧 多平台支持
支持 Windows、Linux、macOS(x64/ARM64)全平台构建
🚀 高性能设计
ID 引用模式,无状态函数,轻量参数传递
🛡️ 类型安全
JSON Schema 验证,编译时类型检查
🔄 自动构建
GitHub Actions 每日自动构建发布
📋 简介
Croupier C++ SDK 是 Croupier 游戏后端平台的官方 C++ 客户端实现。它提供了高性能的虚拟对象注册、gRPC 通信和多平台构建支持。
🚀 快速开始
安装依赖
# 克隆仓库
git clone https://github.com/cuihairu/croupier-sdk-cpp.git
cd croupier-sdk-cpp
# 使用脚本构建(推荐)
./scripts/build.sh
基础使用
#include "croupier/sdk/croupier_client.h"
int main() {
croupier::sdk::ClientConfig config;
config.game_id = "my-game";
config.env = "development";
config.agent_addr = "127.0.0.1:19090";
croupier::sdk::CroupierClient client(config);
client.Connect();
client.Serve();
}