Design: a C ABI so a game runtime can embed the SixM client

未關閉
#4 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
活躍
技術堆疊
rust
領域
api, game-dev

研究方向

Start by reading the sixm-client crate, which the issue identifies as holding the client core. The proposal leaves threading, host registration of script functions, and event and chat delivery unresolved, so those design questions need decisions before implementation. Done means agreeing on a C API header and design note, then implementing it as a cdylib on top of sixm-client.

由索引模型根據 Issue 內容生成。

描述

enhancement help wanted in-game-client

The client core (connect, handshake, send local state, receive snapshots, run client Lua) now lives in the sixm-client Rust crate. A game integration needs to drive it from C or C++.

Needs no game files.

Proposal to flesh out

A small C API, something like:

sixm_client* sixm_connect(const char* host, uint16_t port, const char* name);
void         sixm_set_local_state(sixm_client*, const sixm_state* state);
size_t       sixm_get_remote_players(sixm_client*, sixm_remote* out, size_t max);
void         sixm_tick(sixm_client*);
void         sixm_disconnect(sixm_client*);
Open questions
  • Threading: who owns the network thread, and when may the host call in?
  • How do script-visible game functions get registered by the host?
  • How are events and chat surfaced to the host?
Done when

A header and a design note are agreed here, then implemented as a cdylib on top of sixm-client.

主要語言
Rust
星號
3
分支
1
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CodingRule/SixM 的其他 Issue

查看 CodingRule/SixM 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。