aetheris-client-wasm 0.3.8

WASM browser client for the Aetheris multiplayer platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("cargo:rerun-if-changed=proto/auth.proto");
    println!("cargo:rerun-if-changed=build.rs");
    // Generate only the prost message types (AuthRequest / AuthResponse).
    // We deliberately skip client and server stubs because:
    //   - The generated client stub's connect() method references tonic::transport::Channel,
    //     which requires hyper → mio — both incompatible with wasm32-unknown-unknown.
    //   - The WASM transport is provided by tonic-web-wasm-client instead.
    //   - A hand-written, WASM-compatible AuthServiceClient lives in src/auth.rs.
    tonic_prost_build::configure()
        .build_client(false)
        .build_server(false)
        .compile_protos(&["proto/auth.proto"], &["proto"])?;
    Ok(())
}