Developer SDK

C examples

Install the SDK · View source on GitHub ↗

C SDK installation

C consumes sdk/cgo directly. Link the matching URnetworkSdk library and include urnetwork_sdk.h.

Publication status: not yet published: the urnetwork-sdk Conan recipe and vcpkg port. 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
vcpkg add port urnetwork-sdk

Conan: conan install --requires=urnetwork-sdk/<version> --build=missing. The implemented recipes publish to a first-party Conan remote and vcpkg Git registry. Configure that remote/registry once; upstream Conan Center and vcpkg inclusion require maintainer acceptance.

Supported platforms

Release packaging supports Windows, Linux/glibc and macOS x64/arm64 when their runtimes are present in the manifest. Check the release's native manifest for the exact OS and libc floor.

GitHub and local builds

A Git checkout is source, not an installed C library. Clone sdk and run make -C sdk/cgo package check-package to build a host runtime, CMake archive and recipes. Use SDK_NATIVE_MANIFEST to package a prebuilt matrix.

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.
  • Embed: URnetwork inside your own app, for its own traffic: your backend provisions one client per installation, puts it in its ACL group and sets its data caps; the app runs a local Device and shows its status.

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

  • vcpkg registries — official package-manager documentation, checked September 14, 2026.

First-party registry setup

Conan needs conan remote add urnetwork https://urnetwork.jfrog.io/artifactory/api/conan/conan-local once; then use the install command above. The reference is urnetwork-sdk/<version> (Conan 2.12 or later). For the generated C++ facade, use -o "urnetwork-sdk/*:cpp=True" to add nlohmann/json.

For vcpkg, create vcpkg-configuration.json beside your project's vcpkg.json. Set the registry baseline to the latest commit of https://github.com/urnetwork/vcpkg-registry (git ls-remote https://github.com/urnetwork/vcpkg-registry HEAD); the registry has no commits until the first publication:

JSON
{"default-registry":{"kind":"git","repository":"https://github.com/microsoft/vcpkg","baseline":"<vcpkg commit>"},"registries":[{"kind":"git","repository":"https://github.com/urnetwork/vcpkg-registry","baseline":"<latest registry commit>","packages":["urnetwork-sdk"]}]}

Then vcpkg add port urnetwork-sdk and vcpkg install. The first-party repository and remote need their initial release before those commands can resolve the package. Local archives already provide find_package(urnetwork-sdk CONFIG REQUIRED) and the urnetwork::sdk target.