[GH-ISSUE #5526] Rust bindings for client/embed (netbird-embed crate) #10715

Open
opened 2026-08-05 01:27:01 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @tham-le on GitHub (Mar 6, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5526

Hello,
I built Rust bindings for the client/embed package: netbird-embed (https://crates.io/crates/netbird-embed)

It lets you embed a full NetBird node into any Rust application — no separate VPN client needed.

use netbird_embed::{Client, ClientOptions};

  let client = Client::new(ClientOptions {
      setup_key: Some("YOUR-SETUP-KEY".into()),
      management_url: Some("https://api.netbird.io".into()),
      device_name: Some("my-app".into()),
      ..Default::default()
  })?;

  client.start()?;

  // Dial a peer over the mesh
  let stream = client.dial("tcp", "10.200.0.1:8080")?;

  // Listen on the mesh
  let listener = client.listen(":8080")?;

License: BSD-3-Clause, matching the client-side license.

I am happy to take feedback or discuss.

Originally created by @tham-le on GitHub (Mar 6, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5526 Hello, I built Rust bindings for the client/embed package: netbird-embed (https://crates.io/crates/netbird-embed) It lets you embed a full NetBird node into any Rust application — no separate VPN client needed. ```rust use netbird_embed::{Client, ClientOptions}; let client = Client::new(ClientOptions { setup_key: Some("YOUR-SETUP-KEY".into()), management_url: Some("https://api.netbird.io".into()), device_name: Some("my-app".into()), ..Default::default() })?; client.start()?; // Dial a peer over the mesh let stream = client.dial("tcp", "10.200.0.1:8080")?; // Listen on the mesh let listener = client.listen(":8080")?; ``` License: BSD-3-Clause, matching the client-side license. I am happy to take feedback or discuss.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10715