Skip to content

Latest commit

 

History

117 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal Fish Client SDK

Documentation Crates.io docs.rs CI MSRV License: MIT

Signal Fish is a multiplayer signaling service. This Rust SDK connects a game to a Signal Fish server, joins players to rooms, relays game data, and exposes server activity as typed events. It supports ordinary Tokio applications and frame-driven engines such as Godot.

The SDK does not provide a game engine, rollback implementation, or WebRTC backend. It handles the Signal Fish protocol while your game owns simulation and peer networking.

Start here

Need a local server or app ID? Follow the server's five-minute quick start. Its development setup accepts a test app ID. The App ID is a public application label, not a secret; production servers use the operator's configured policy.

Add the client and Tokio:

[dependencies]
signal-fish-client = "0.10.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

Connect, wait for authentication, and join a room:

use signal_fish_client::{
    JoinRoomParams, SignalFishClient, SignalFishConfig, SignalFishEvent,
    WebSocketTransport,
};

#[tokio::main]
async fn main() -> Result<(), signal_fish_client::SignalFishError> {
    let transport = WebSocketTransport::connect("ws://localhost:3536/v2/ws").await?;
    let config = SignalFishConfig::new("mb_app_abc123");
    let (mut client, mut events) = SignalFishClient::start(transport, config);

    while let Some(event) = events.recv().await {
        match event {
            SignalFishEvent::Authenticated { .. } => {
                client.join_room(JoinRoomParams::new("my-game", "Alice"))?;
            }
            SignalFishEvent::RoomJoined { room_code, .. } => {
                println!("joined {room_code}");
            }
            SignalFishEvent::Disconnected { .. } => break,
            _ => {}
        }
    }

    client.shutdown().await;
    Ok(())
}

In a clone of the source repository, run the complete example, which also handles readiness, game start, reconnection state, errors, and Ctrl+C:

cargo run --example basic_lobby

Set SIGNAL_FISH_URL to use a server other than ws://localhost:3536/v2/ws.

The published 0.10.0 crate is the stable release. This branch also documents unreleased changes planned for 0.11. Use the 0.10.0 API docs for the published surface, or see the changelog before depending on main.

Choose your integration

Your application Use
Tokio application SignalFishClient with the built-in WebSocketTransport
Native or web Godot 4.5 game SignalFishPollingClient with signal-fish-client-godot
Browser or another frame-driven host SignalFishPollingClient with your own Transport
Custom async network stack SignalFishClient with your own Transport + Send

Start with protocol v2 relay unless you need Server 0.7 delivery accountability or WebRTC mesh signaling. Opt into those features deliberately; the protocol versioning guide explains the choice.

Documentation

The full guide keeps advanced protocol, delivery, transport, and migration material separate from the onboarding path.

Before production

  • Enable the tls feature and use wss:// outside a trusted local environment.
  • Drain events continuously; a full event channel intentionally backpressures the transport loop.
  • Treat SendBufferFull as congestion and retry according to your game policy.
  • Call shutdown().await when possible so the transport can close cleanly.
  • Allow the exact HTTPS origin serving a browser or Godot web build in the Signal Fish server configuration.

Project notes

The core crate supports Rust 1.87.0 and newer. The Godot adapter requires Rust 1.94.0 because of its godot-rust dependency.

AI disclosure

This project was developed with substantial AI assistance. Humans created the protocol and core technology concepts and retained responsibility for architecture and review; AI tools assisted heavily with implementation, documentation, and tests.

Signal Fish Client SDK is available under the MIT License. Brand asset provenance and bundled font licenses are recorded in the documentation attribution page.

About

Rust client for the Signal Fish Server (and protocol)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages