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

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
api, game-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
3
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodingRule/SixM

Tất cả issue của CodingRule/SixM

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.