Reticulum-Go/bindings/dart
2026-08-13 00:09:12 -05:00
..
example feat: add Dart Control API client and bindings for Flutter 2026-07-16 13:28:29 -05:00
examples/smoke feat: updated language bindings with new Rust, Python, Lua, Swift, Java, and Kotlin support 2026-07-19 11:01:13 -05:00
lib feat: wire destination ratchets into announce, remember, and SINGLE encrypt 2026-08-13 00:09:12 -05:00
test feat: update Dart bindings with new request handling and event types, including deregistration and resource management 2026-07-17 08:10:03 -05:00
.gitignore feat: add Dart Control API client and bindings for Flutter 2026-07-16 13:28:29 -05:00
analysis_options.yaml feat: add Dart Control API client and bindings for Flutter 2026-07-16 13:28:29 -05:00
Makefile feat: updated language bindings with new Rust, Python, Lua, Swift, Java, and Kotlin support 2026-07-19 11:01:13 -05:00
pubspec.yaml feat: add Dart Control API client and bindings for Flutter 2026-07-16 13:28:29 -05:00
README.md feat: add Dart Control API client and bindings for Flutter 2026-07-16 13:28:29 -05:00

Dart / Flutter bindings for Reticulum-Go

Package rns_control includes:

  1. librns FFI (package:rns_control/ffi.dart): in-process mesh on Linux, Android, and Windows
  2. Control API client (package:rns_control/rns_control.dart): HTTP and WebSocket to a running daemon

FFI (Linux, Android, Windows)

import 'package:rns_control/ffi.dart';

final rns = Rns();
print(rns.version());

final node = rns.nodeCreate();
rns.nodeStart(node);

Load order for the shared library:

  1. libraryPath argument
  2. RNS_LIB_PATH
  3. Platform defaults (librns.so on Android, search under bin/ on Linux and Windows)

Build native libraries from the repository root:

task build-librns
# or cross-build
task build-librns-targets -- linux android windows
Platform Artifact
Linux bin/librns.so
Android bin/android/<abi>/librns.so (arm64-v8a, armeabi-v7a, x86_64)
Windows bin/windows/amd64/librns.dll

Flutter Android: copy the ABI folders into android/app/src/main/jniLibs/.

Flutter Windows: ship librns.dll next to the runner binary or set RNS_LIB_PATH.

Needs Android NDK (ANDROID_NDK_HOME) for Android builds, and mingw or Zig for Windows.

Control API

import 'package:rns_control/rns_control.dart';

final client = ControlClient(rpcKey: rpcKey);
final health = await client.health();

Browser WebSocket cannot set the Authorization header required by the events endpoint.

Test

task build-librns
task test-dart
# or
make -C bindings/dart test

See docs/en/librns.md and docs/en/control-api.md in the repository root.