Developer SDK

Rust examples

Install the SDK · View source on GitHub ↗

provider/Cargo.toml

TOML
[package]
name = "urnetwork-provider-example"
version = "0.1.0"
edition = "2024"
publish = false

# The provider core (status rules, state files, provider session) is a library,
# so the console app here and the Tauri app (tauri/provider) share one tested core.
[lib]
name = "urnetwork_provider"
path = "src/lib.rs"

[[bin]]
name = "provider"
path = "src/main.rs"
required-features = ["console"]

[features]
default = ["console"]
# the console app's Ctrl-C and SIGTERM handling; the Tauri app builds without it
console = ["dep:ctrlc"]

[dependencies]
urnetwork-sdk = "0.0.1-dev.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
base64 = "0.22"
getrandom = "0.3"
sha2 = "0.10"
tempfile = "3"
ctrlc = { version = "3", features = ["termination"], optional = true }