Developer SDK

Rust examples

Install the SDK · View source on GitHub ↗

Rust SDK installation

Rust exposes the raw C ABI and owned Handle/Device/Conn wrappers over sdk/cgo. The package embeds compressed native runtime bytes, verifies their digest, and loads them without requiring Go in the consumer.

Publication status: not yet published: the urnetwork-sdk crate. Its first publication comes with the next nightly that carries the stable SDK packages; until then, build the local package below. Stable releases use the app's release version (for example 2026.11.22); nightlies use the prerelease form 2026.11.22-1105365180.

Install with the native package manager

Shell
cargo add urnetwork-sdk

Pin a registry version with cargo add urnetwork-sdk@<version>. This is a library: cargo install is not the installation command. Rust code refers to the crate as urnetwork_sdk.

Supported platforms

Rust 1.85+ and a platform included in the release manifest. The small public crate downloads a version-pinned, checksum-verified native gzip at build time and embeds the runtime in the executable. SDK_RUST_NATIVE_CACHE supports a prepopulated offline cache. Source checkout users run the native preparation target.

GitHub and local builds

Cargo supports Git dependencies, but the source checkout must first have its runtime prepared with make -C sdk/rust native (or explicitly use URNETWORK_SDK_LIBRARY). For an install independent of the checkout, use the .crate produced by make -C sdk/rust.

Examples

  • Integration: service provisioning, scoped client credentials and Device lifecycle.
  • Sockets: TCP/UDP, TLS/DTLS and HTTP client adapters.
  • Messages: live peer discovery and interoperable text/ACK exchange.
  • Provider: a provider client of your network with the consent disclaimer, status, payout wallet display and background run; its provider core also runs the Tauri provider.
  • Embed: your backend provisions a client for each installation of your app, with per-user data caps, and the app embeds the SDK and starts a Device that carries only its own traffic; its embed core also runs the Tauri embed app.

Apps use URNETWORK_CLIENT_JWT and a persisted URNETWORK_INSTANCE_ID; only the service backend holds URNETWORK_ROOT_JWT. See the shared contract and official networking research.

Use an SDK release containing the required APIs. The package plan records package names, build outputs and publication gates.

References

  • Cargo dependencies — official package-manager documentation, checked September 14, 2026.