synurang 0.8.1
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-platformprotoc-gen-synurang-ffibinaries, multi-language test matrices, Android AAR / Desktop JAR and Python sdist/wheel verification,SHA256SUMSmanifests, rollingnightlypre-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_mavenandmake publish_maven_release(scripts/release.py publish-maven-local) to download and checksum-verify GitHub Release Maven artifacts (or verify localdist/maven), GPG-sign locally, and upload one atomic bundle via the Sonatype Central Portal API, including--dry-runsupport. - Desktop JAR macOS JNI cross-build fix: Updated
docker/build_desktop_jar.shto compilemodule_host.candsynurang_module_jni.cwith-O2 -pthreadfor macOS targets and enforce all 8 platform JNI libraries whenREQUIRE_ALL_TARGETS=1. - TypeScript gRPC parity test fix: Updated
test/typescript/grpc_parity.tsto read Node stream events explicitly instead ofSymbol.asyncIteratorso Node 22 does not close Duplex streams prematurely on readable EOF.
0.8.0 #
- Native and WebAssembly call modules: Added
mode=moduleproviders for C/C++, Rust and Go with a shared asynchronousSynurang_GetApicall 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=clientgeneration 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=jsgeneration for grpc-js service definitions, server interfaces and clients using lite messages.PluginChannellets the same client call a network server or an FFI plugin with streaming, deadlines, cancellation and structuredServiceErrorhandling. - 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.MEMBERfor a single-member type. Aliases, negative values and minified nested messages remain supported. - TypeScript compilation fixes: Avoid utility type collisions for schemas named
Excludeand emitoverridefor fields that shadow Object members when usingnoImplicitOverride.
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=cnow emits source-relative dependency-free_lite.h/.cfiles plus a single_ffi.h/.cservice surface with flattened unary calls, typed unary/stream handlers, and the standard plugin ABI.mode=literemains message-only;mode=nativeis 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.Timestampandgoogle.protobuf.DurationalongsideEmpty, so schemas reaching them — including any schema that uses Synurang's owncore.proto— generate without a protobuf runtime. Othergoogle.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/Recvdispatch 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 bareSYNURANG_PENDING.TrySend/TryRecvdo not directly pump callbacks, although a synchronouswakeupimplementation 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=typescriptalso emitsPluginHostAsyncand a<Service>FfiAsyncclient 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_ARGUMENTno longer aliasesSYNURANG_ERROR, so callers can distinguish them and switch overSynurangStatus. A generated stream cancelled before itson_openruns now passesNULLtoon_cancelandon_destroy, preventing shared service state from being mistaken for owned per-stream state.on_cancelis for cancellation and async cleanup;on_destroyremains the sole final-free point for owned per-stream state. Whenon_openis omitted,service_user_datastays 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.hand_lite.cschema 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.Emptyis supported directly; othergoogle.protobufwell-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-rsbinary with one Rust-basedprotoc-gen-synurang-ffi. Output selection is unchanged, includinglang=goand the existing default Go/Dart generation behavior. - Python 3.10+ neutral clients and codegen: Added dependency-free proto3 protobuf-lite messages, a neutral
RpcTransport,FfiTransportover thectypesplugin host, and an optional synchronousGrpcTransportfor remote servers. The same generated*ClientAPI supports all four RPC cardinalities over either transport, while*Ffi(host)remains compatible.mode=liteemits only messages; neithergoogle.protobufnorprotoc --python_outis 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, andresetCoreStateso apps can explicitly recover the embedded native core after an FFI timeout by resetting Dart helper isolates and issuing nativeStop/Startcalls. - 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
CoreUnavailableExceptionorCoreRestartRequiredException.FfiClientChannelmaps these recovery errors to gRPCunavailable. - Recovery test coverage: Added a debug-only
HangForRPC plus recovery tests covering core state transitions, concurrentrecoverCoreAsynccallers, lifecycle calls while unhealthy, pending request cleanup, stream cleanup, andrestartRequiredbehavior. - Rust generator implementation: Added
protoc-gen-synurang-ffi-rs, a Rust/prost reimplementation ofprotoc-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) andlang=cpp,mode=litecode 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_cancelsupport 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
internalvisibility andrepeated int32code 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
PluginErrorwithFfiErrorcarryingcode,message, andgrpc_codefields across all 6 languages (Go, Dart, C++, Rust, Java, C#). - New wire format: Unary uses
resp_len < 0for errors (payload is serializedcore.v1.Error); stream usesstatus < 0. Removes the old status-byte prefix overhead. - Plugin stream interfaces: Go plugin server codegen now emits minimal
PluginStreaminterfaces instead ofgrpc.ServerStream, removing thegoogle.golang.org/grpc/metadatadependency from plugin code. - gRPC status extraction: New
pkg/ffierrorpackage 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-ffinow correctly mapsgoogle/protobuf/imports topackage: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.