just-webrtc-signalling 0.2.1

Just simple, fast and easy signalling for full-mesh WebRTC connections on native and wasm
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let proto_path: &Path = "proto/main.proto".as_ref();
    let target = std::env::var("TARGET").unwrap();
    // directory the main .proto file resides in
    let proto_dir = proto_path
        .parent()
        .expect("proto file should reside in a directory");
    tonic_build::configure()
        .build_transport(target != "wasm32-unknown-unknown")
        .compile_protos(&[proto_path], &[proto_dir])?;
    Ok(())
}