Skip to main content

synurang 0.8.1 copy "synurang: ^0.8.1" to clipboard
synurang: ^0.8.1 copied to clipboard

Flutter FFI + gRPC bridge for bidirectional Go/Dart communication

0.8.1 #

  • Automated CI/CD & release verification: Added GitHub Actions workflows (.github/workflows/build.yml) and release tooling (scripts/release.py) covering cross-platform protoc-gen-synurang-ffi binaries, multi-language test matrices, Android AAR / Desktop JAR and Python sdist/wheel verification, SHA256SUMS manifests, rolling nightly pre-releases, and draft/stable GitHub Release staging with opt-in Maven Central, PyPI (OIDC), and pub.dev (OIDC) publishing.
  • Local Maven Central publishing: Added make publish_maven and make publish_maven_release (scripts/release.py publish-maven-local) to download and checksum-verify GitHub Release Maven artifacts (or verify local dist/maven), GPG-sign locally, and upload one atomic bundle via the Sonatype Central Portal API, including --dry-run support.
  • Desktop JAR macOS JNI cross-build fix: Updated docker/build_desktop_jar.sh to compile module_host.c and synurang_module_jni.c with -O2 -pthread for macOS targets and enforce all 8 platform JNI libraries when REQUIRE_ALL_TARGETS=1.
  • TypeScript gRPC parity test fix: Updated test/typescript/grpc_parity.ts to read Node stream events explicitly instead of Symbol.asyncIterator so Node 22 does not close Duplex streams prematurely on readable EOF.

0.8.0 #

  • Native and WebAssembly call modules: Added mode=module providers for C/C++, Rust and Go with a shared asynchronous Synurang_GetApi call ABI. All four RPC forms support bounded queues, backpressure, cancellation, deadlines and coordinated shutdown, with each provider using its own runtime.
  • Typed module clients and hosts: Added mode=client generation for TypeScript, Dart, Java, C#, Python and Swift, plus native C++, Rust and Go hosts and optional gRPC adapters. Browser/Node WebAssembly and Worker hosts support the same call contract, and Dart can register in-process services. See CALL-RUNTIME.md for supported language and target combinations.
  • TypeScript gRPC integration: Added grpc=js generation for grpc-js service definitions, server interfaces and clients using lite messages. PluginChannel lets the same client call a network server or an FFI plugin with streaming, deadlines, cancellation and structured ServiceError handling.
  • Shared-memory examples and conformance coverage: Added Linux Python/C++ callers with a C backend for shared buffers and FIFO, Latest and Batch frame queues, plus native and WebAssembly call lifecycle, streaming, backpressure and cleanup checks across language hosts.

0.7.5 #

  • Smaller TypeScript lite messages: Share binary/JSON conversion methods across message classes instead of emitting five wrappers per message. Concrete decoder types, detached decoder callbacks, constructor defaults and oneof presence are preserved, including after minification.
  • Compact TypeScript lite metadata: Expand repeated field metadata once at module load, derive field-number maps from the same declaration, and share enum reverse-lookup construction. Messages retain individual constructors and the existing binary/JSON codec. Lite enums and oneof cases are constant objects with numeric value types; use typeof Enum.MEMBER for a single-member type. Aliases, negative values and minified nested messages remain supported.
  • TypeScript compilation fixes: Avoid utility type collisions for schemas named Exclude and emit override for fields that shadow Object members when using noImplicitOverride.

0.7.4 #

  • TypeScript message identity: Use protobuf fully qualified names for message registration and references so nested messages encode and decode correctly after minification, including messages with the same name in different scopes.
  • TypeScript oneof copies: Message constructors skip undefined fields and preserve explicit oneof selectors, keeping selected payloads and valid default values intact when copying decoded messages.
  • TypeScript decoding performance: Reuse a field-number lookup table per message class instead of searching the field list for every decoded tag.
  • C lite build fix: Avoid unused allocator warnings when clearing scalar-only oneofs. Added strict C build coverage alongside TypeScript minification and oneof roundtrip regression tests.

0.7.3 #

  • Complete C bindings: lang=c now emits source-relative dependency-free _lite.h/.c files plus a single _ffi.h/.c service surface with flattened unary calls, typed unary/stream handlers, and the standard plugin ABI. mode=lite remains message-only; mode=native is a deprecated alias for the complete output.
  • C streaming runtime: Added a shared bounded-queue runtime with a threaded default, non-blocking manual polling for libuv and threadless WebAssembly, typed event callbacks, backpressure, structured errors, retain/release support, and explicit default-runtime shutdown before shared-library unload.
  • C lite well-known types: The C codec now supplies google.protobuf.Timestamp and google.protobuf.Duration alongside Empty, so schemas reaching them — including any schema that uses Synurang's own core.proto — generate without a protobuf runtime. Other google.protobuf.* types are still rejected up front, now naming the supported set. Nested payloads inside a shared well-known message also count against the shared recursion budget instead of restarting it.
  • C manual runtime drives blocking calls: On a manual runtime Synurang_Stream_Send/Recv dispatch pending callbacks on the calling thread until the operation completes, so a stock blocking host can drive a manual or threadless plugin instead of receiving a bare SYNURANG_PENDING. TrySend/TryRecv do not directly pump callbacks, although a synchronous wakeup implementation can poll and re-enter before they return.
  • C enum constant style: Documented enum_names=short|qualified, which selects whether C enum constants keep protobuf's repeated enum-name prefix.
  • TypeScript async host: lang=typescript also emits PluginHostAsync and a <Service>FfiAsync client for engines whose work cannot block the caller (a worker, a GPU queue, a network hop). Messages and semantics match the synchronous client; only the call convention differs.
  • Fixes: SYNURANG_INVALID_ARGUMENT no longer aliases SYNURANG_ERROR, so callers can distinguish them and switch over SynurangStatus. A generated stream cancelled before its on_open runs now passes NULL to on_cancel and on_destroy, preventing shared service state from being mistaken for owned per-stream state. on_cancel is for cancellation and async cleanup; on_destroy remains the sole final-free point for owned per-stream state. When on_open is omitted, service_user_data stays shared and borrowed and must not be freed per stream. Stream handle lookup is now bucketed rather than a linear scan of every live stream.

0.7.2 #

  • Dependency-free C protobuf-lite messages: Added lang=c,mode=lite, which emits _lite.h and _lite.c schema bindings with fixed-width enums, owned message values, and protobuf binary encode/decode/merge without a libprotobuf runtime. Nested-message decoding is depth-bounded (including across generated-file boundaries), numeric enum aliases are preserved (value-to-name uses the first declaration, parsing accepts every alias), and output keeps the input proto's relative directory so cross-file imports resolve. google.protobuf.Empty is supported directly; other google.protobuf well-known types are rejected instead of producing incomplete bindings.

0.7.0 #

  • Canonical Rust generator: Replaced the Go code-generator implementation and the temporary protoc-gen-synurang-ffi-rs binary with one Rust-based protoc-gen-synurang-ffi. Output selection is unchanged, including lang=go and the existing default Go/Dart generation behavior.
  • Python 3.10+ neutral clients and codegen: Added dependency-free proto3 protobuf-lite messages, a neutral RpcTransport, FfiTransport over the ctypes plugin host, and an optional synchronous GrpcTransport for remote servers. The same generated *Client API supports all four RPC cardinalities over either transport, while *Ffi(host) remains compatible. mode=lite emits only messages; neither google.protobuf nor protoc --python_out is required. Python 2 is not supported.
  • Generator release packaging: Added a version-pinned Docker release build for static Linux x86-64/AArch64 and Windows x86-64 binaries, reproducible archives, SHA256SUMS, and Make targets for publishing the assets to GitHub Releases.
  • Generator regression coverage: Consolidated language/mode generation and option validation around the canonical Rust binary, including Python generation and rejection of unsupported Python 2 output.

0.6.2 #

  • Dart core recovery: Added StartGrpcServerOptions, CoreState, CoreRecoveryResult, recoverCoreAsync, getCoreState, and resetCoreState so apps can explicitly recover the embedded native core after an FFI timeout by resetting Dart helper isolates and issuing native Stop / Start calls.
  • Timeout and shutdown handling: Per-call FFI timeouts now mark the core unhealthy, fail pending requests, close active server/plugin streams, and gate new RPCs with CoreUnavailableException or CoreRestartRequiredException. FfiClientChannel maps these recovery errors to gRPC unavailable.
  • Recovery test coverage: Added a debug-only HangFor RPC plus recovery tests covering core state transitions, concurrent recoverCoreAsync callers, lifecycle calls while unhealthy, pending request cleanup, stream cleanup, and restartRequired behavior.
  • Rust generator implementation: Added protoc-gen-synurang-ffi-rs, a Rust/prost reimplementation of protoc-gen-synurang-ffi, with make targets and parity tests that compare generated output, flag validation, and benchmark runs against the Go generator.

0.6.1 #

  • C++ Lite support: Added a zero-dependency C++11 header-only runtime (cpp/synurang_lite.hpp) and lang=cpp,mode=lite code generation for protobuf messages and FFI service stubs.
  • C++ Lite protobuf coverage: Generated lite headers now cover imported lite headers, well-known types, maps, repeated and packed fields, optional fields, oneofs, and streaming service helpers without requiring libprotobuf or gRPC.
  • C++ generation tests: Expanded C++ generator tests to validate lite header generation for core/cache/native protos and syntax-check the generated headers with g++.

0.6.0 #

  • Swift Lite support: Added zero-dependency Swift runtime packaging, Swift code generation, ProtoLite encoding/decoding, well-known type support, plugin host/stream APIs, and Swift generator/integration/stress tests.
  • TypeScript support: Added TypeScript Lite schema/code generation and TypeScript FFI client generation, with generator coverage for enums, services, streaming methods, and well-known types.
  • Plugin cancellation callbacks: Added on_cancel support for Rust and C++ plugin servers with regression tests covering cancellation callback behavior.

0.5.10 #

  • C# Lite and stream worker fixes: Added C# Lite support for .NET 4.0, fixed internal visibility and repeated int32 code generation issues, and stabilized plugin stream scheduling with a dedicated worker plus regression tests.

0.5.6 #

  • Concurrency and packaging fixes: Hardened plugin host/stream teardown across hosts, improved Android debug AAR packaging, and added Java/Rust host test coverage.

0.5.5 #

  • TypeScript codegen: Added lightweight TypeScript schema constants for enums, field numbers, and full gRPC method paths, with generator coverage tests.

0.5.4 #

  • Structured FFI errors: Replaced PluginError with FfiError carrying code, message, and grpc_code fields across all 6 languages (Go, Dart, C++, Rust, Java, C#).
  • New wire format: Unary uses resp_len < 0 for errors (payload is serialized core.v1.Error); stream uses status < 0. Removes the old status-byte prefix overhead.
  • Plugin stream interfaces: Go plugin server codegen now emits minimal PluginStream interfaces instead of grpc.ServerStream, removing the google.golang.org/grpc/metadata dependency from plugin code.
  • gRPC status extraction: New pkg/ffierror package extracts structured errors from gRPC status details via reflection, avoiding a hard gRPC dependency.

0.5.0 #

  • WASM & Rust native: Added WASM and Rust native support.
  • ActiveX: Added ActiveX support.

0.4.0 #

  • C# support: Added full support for C# via pure managed interop (NativeLibrary + Marshal).
  • Pull-based C ABI: Dart plugin host with pull-based C ABI support for streaming.

0.3.0 #

  • FFI without gRPC dependency: FFI transport layer no longer requires gRPC as a dependency.
  • Android/Java support: Added full support for Android and Java via JNI.
  • Process Mode improvements: Enhanced process mode functionality.

0.2.0 #

  • Process Mode: Support for parent-child IPC via socketpair (Unix) and Named Pipes (Windows).
  • Multi-language Support: Full support for C++ and Rust (including streaming) via FFI and Process Mode.

0.1.9 #

  • In-process microservice (FFI + shared library).
  • Apply template.

0.1.8 #

  • Add runtime library and Go-to-Go FFI support.

0.1.7 #

  • Add support for Android, iOS, macOS, and Windows platforms in pubspec.yaml and project structure.

0.1.6 #

  • Fix: protoc-gen-synurang-ffi now correctly maps google/protobuf/ imports to package:protobuf/well_known_types/.
  • Fix: Correct Go/Dart module paths in example code and proto definitions + dart_package option

0.1.5 #

  • Include Dart generated files in the package.

0.1.4 #

  • Fix internal import paths to use GitHub module path.

0.1.3 #

  • Include generated Go code for remote usage.

0.1.2 #

  • Fix go.mod configuration.

0.1.1 #

  • Fix link in documentation.

0.1.0 #

  • Initial release of synurang, a Flutter FFI + gRPC bridge for bidirectional Go/Dart communication.
1
likes
150
points
71
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter FFI + gRPC bridge for bidirectional Go/Dart communication

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

ffi, fixnum, flutter, grpc, protobuf

More

Packages that depend on synurang

Packages that implement synurang