zuraffa_ffi

Typed FFI support for the Zuraffa ecosystem: a pure-Dart port, module lifecycle, and typed failures behind an injected platform channel with federated adapters.

Part of the zuraffa_ffi federated monorepo, built on the Zuraffa framework.

Use

final service = FfiService(port: myPlatformPort);
final module = await service.compile(id: 'demo', bytes: moduleBytes);
final results = await service.call(
    id: 'demo', export: 'run', args: [FfiI32(1)]);
await service.unload(id: 'demo');

Wire the platform adapter for the running platform first — e.g. registerAndroidFfiDependencies(getIt, channel: ...) from the adapter package — then resolve FfiService, or call registerFfiDependencies(getIt, port: ...) directly. Without a wired port every call surfaces the typed port_not_wired failure.

Develop

dart pub get
dart test

Libraries

zuraffa_ffi
zuraffa_ffi — Ffi support for the Zuraffa ecosystem.