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

Abierto
#4 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
rust
Área
api, game-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
3
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CodingRule/SixM

Todos los issues de CodingRule/SixM

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.