truffle 0.7.5

P2P mesh networking for your devices, built on Tailscale
docs.rs failed to build truffle-0.7.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: truffle-0.7.3

truffle

P2P mesh networking for your devices, built on Tailscale.

This is the convenience crate that bundles truffle-core (the Rust library) and truffle-sidecar (auto-downloaded Go binary). For most users, this is the only dependency you need.

Quick start

[dependencies]
truffle = "0.4"
use truffle::{Node, sidecar_path};
use truffle::network::tailscale::TailscaleProvider;

# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let node = Node::<TailscaleProvider>::builder()
    .app_id("my-app")?
    .device_name("my-device")
    .sidecar_path(sidecar_path())
    .build()
    .await?;

// Send a message to all peers
node.broadcast_json("chat", &serde_json::json!({ "text": "hello!" }))
    .await?;

// Subscribe to messages
let mut rx = node.subscribe("chat");
# Ok(())
# }

Advanced: BYO sidecar

If you want to manage the sidecar binary yourself, depend on truffle-core directly:

[dependencies]
truffle-core = "0.4"