Repository navigation
Conversation
…adosoft/native-modules - kit/ (@padosoft/ecr17-kit): the React-free C++20 core (namespace padosoft::ecr17, headers <Ecr17Kit/...>): LRC, framing, builders, parsers, the ACK/NAK session, and Ecr17Client, which now owns auto-connect, the pre-send liveness probe and the money-safe retry policy (moved out of HybridEcr17Client). On Windows it also builds WinsockTransport (moved from the Nitro transport). CMake target Ecr17Kit::Ecr17Kit, Ecr17Kit pod, Expo config plugin, nativeKit.windows manifest. - Tests: the whole suite moved to kit/ (cmake -S kit). 15 new client tests, including one that replays every command against a drop: a financial command is never re-sent. The Winsock loopback tests no longer need Nitro. - package/: HybridEcr17Client maps the Nitro types onto the Kit client; NativeTransportAdapter exposes the Ecr17Transport HybridObject as a Kit Transport; the Windows HybridObject wraps the Kit's WinsockTransport. Ecr17.podspec is one nitro_module(kit: "Ecr17Kit") call, android/build.gradle applies nitro-module.gradle; the Android CMake and the Windows vcxproj compile the Kit's sources. - @padosoft/native-modules and @padosoft/expo come from GitHub Packages (not on npm yet); CI strips them where they are not needed. Verified: kit tests 100/100 on macOS (ASan/UBSan); the Expo example builds for the iOS simulator (prebuild, pod install, xcodebuild). Not verified: Android build, Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying react-native-ecr17-protocol with
|
| Latest commit: |
b280b77
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f37b5bbf.react-native-ecr17-protocol.pages.dev |
| Branch Preview URL: | https://feat-ecr17-native-kits.react-native-ecr17-protocol.pages.dev |
@padosoft/native-modules becomes a regular dependency of the binding and the Kit (it has no dependencies or peers), so consumers get it with the package and the change is not breaking: the changeset is minor. @padosoft/expo stays an optional peer of the Kit (it peers on expo); the Expo example lists it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47PADO47
added this pull request to stack #27
October 5, 2026 19:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Splits the module into a native library and a React Native binding, so the protocol can be used by fully native apps (Windows C++, and later Swift/Kotlin, .NET) as well as by React Native.
kit/—@padosoft/ecr17-kit(new)A React-free C++20 library, namespace
padosoft::ecr17, headers<Ecr17Kit/…>:Lcr,PacketCodec,Ecr17Protocol,Ecr17Response,Ecr17SessionandRetryPolicy. Moved unchanged apart from the namespace, plus its ownLrcMode.Ecr17Client: auto-connect, the pre-send liveness probe and the money-safe retry policy. This orchestration used to live inHybridEcr17Client, where nothing tested it exceptRetryPolicy.WinsockTransport: the Winsock code from feat(windows): React Native Windows support (Nitro install DLL + Winsock transport) #23, now a plain C++Transportwith no Nitro. Its loopback tests no longer need Nitro or nitrogen.Ecr17Kit::Ecr17Kit, installable withfind_packagesupport;Ecr17Kitpod (C++ sources, public<Ecr17Kit/…>headers);createNativeKitPluginfrom@padosoft/expo);nativeKit.windowsmanifest, for the shared Nitro host in the next PR.package/— the binding, no protocol logic leftHybridEcr17Clientmaps the Nitro types onto the Kit'sEcr17Client. JS numbers go throughtoInt, so NaN or out-of-range values now throw instead of hitting undefined behaviour.NativeTransportAdapterexposes theEcr17TransportHybridObject as a KitTransport.HybridEcr17TransportWindowswraps the Kit'sWinsockTransport, keeping the dedicated connect thread.@padosoft/native-modules:Ecr17.podspecis a singlenitro_module(…, kit: "Ecr17Kit")call;android/build.gradleappliesnitro-module.gradle, andandroid.packageNamemoves toreact-native.config.js;node_modulesor../kit.💰 Money safety
RetryPolicyis untouched. The newClient.AFinancialCommandIsNeverResentAfterADroptest replays every financial command against a drop withautoReconnecton. In each case, the command goes out once and the socket is restored.Deliberately breaking
shouldRetryAfterReconnect(droppingsafeToRetry) fails two tests.@padosoft/native-modules(1.5.0) and@padosoft/expo(1.11.0) are installed from the padosoft GitHub Packages registry, like@padosoft/config:scripts/strip-private-deps.mjs).android-buildkeeps them, so theGESCAT_NPM_TOKENsecret must be able to read padosoft packages.example-windows(npm) needs no registry config: npm resolves the dependencies offile:-linked packages from their own folder, which the rootbun installfills.@padosoft/ecr17-kititself isn't published yet: changesets will publish it alongside the binding.Changeset: minor
@padosoft/native-modulesis a regular dependency of the binding and the Kit (it has no dependencies or peers), so apps get it automatically: no breaking change. The JS API is unchanged. On iOS, Expo apps add the Kit's config plugin (which uses@padosoft/expo, an optional peer of the Kit, because it peers onexpo); bare apps list@padosoft/ecr17-kitas a direct dependency.Verification
cmake -S kit, which is also whatcpp-testsnow runs).expo prebuild -p ios: the Kit's plugin adds the pod;pod install:nitro_modulelinksEcr17Kitthrough CocoaPods;xcodebuild: BUILD SUCCEEDED.-Wall -Wextra, and TS typecheck passes.android-buildjob;cmake -S kit -B build-win && cmake --build build-win --config Release && ctest --test-dir build-win -C Release;example-windowsbuild and deploy;The local Copilot review loop from AGENTS.md has not been run.
🤖 Generated with Claude Code