mirror of
https://github.com/Quad4-Software/Reticulum-Go
synced 2026-08-29 23:48:44 -04:00
| .. | ||
| example | ||
| examples/smoke | ||
| lib | ||
| test | ||
| .gitignore | ||
| analysis_options.yaml | ||
| Makefile | ||
| pubspec.yaml | ||
| README.md | ||
Dart / Flutter bindings for Reticulum-Go
Package rns_control includes:
- librns FFI (
package:rns_control/ffi.dart): in-process mesh on Linux, Android, and Windows - 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:
libraryPathargumentRNS_LIB_PATH- Platform defaults (
librns.soon Android, search underbin/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.