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

Offen
#4 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
api, game-dev

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Rust
Sterne
3
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CodingRule/SixM

Alle Issues in CodingRule/SixM

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.