ping-openmls-sdk-react-native-macos 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
Binary file
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # `ping-openmls-sdk-react-native-macos`
2
+
3
+ > **Status:** stage 1 of [docs/RN_NATIVE_BINDINGS.md](../../docs/RN_NATIVE_BINDINGS.md) —
4
+ > Rust build pipeline only. The Pod, Swift bridge, and JS API land in stages 2–4.
5
+
6
+ Real MLS for React Native macOS apps. Wraps the same Rust core (`core/ping-core` →
7
+ `core/ping-ffi`) that iOS, Android, and Web use, packaged as a TurboModule for RN-macOS.
8
+
9
+ ## Build the native artefact
10
+
11
+ ```bash
12
+ # From repo root, on macOS:
13
+ ./scripts/build-macos.sh
14
+ ```
15
+
16
+ The script:
17
+
18
+ 1. Adds Rust targets `aarch64-apple-darwin` and `x86_64-apple-darwin` if missing.
19
+ 2. Cross-compiles `ping-openmls-sdk-ffi` for both targets at `MACOSX_DEPLOYMENT_TARGET=10.15`.
20
+ 3. `lipo`s the two `.a`s into a universal static archive at
21
+ `bindings/react-native-macos/Frameworks/libping_ffi.a`. CocoaPods links this directly
22
+ into the host app's binary at build time — no runtime dylib loading, no rpath setup.
23
+ 4. Runs `uniffi-bindgen` (Swift target) to produce `Generated.swift`, `pingFFI.h`, and
24
+ `module.modulemap` in `ios/`.
25
+
26
+ All output is gitignored — re-run the script after pulling new commits to the Rust core.
27
+
28
+ ## Layout
29
+
30
+ | Path | Source / Generated | Purpose |
31
+ |---|---|---|
32
+ | `Frameworks/libping_ffi.a` | generated by `build-macos.sh` | Universal arm64+x86_64 static lib (linked into host app) |
33
+ | `ios/Generated.swift` | generated by `uniffi-bindgen` | Swift type wrappers around the C ABI |
34
+ | `ios/pingFFI.h` | generated | C header |
35
+ | `ios/module.modulemap` | generated | Clang module map for Swift import |
36
+ | `ios/PingNativeModule.swift` | hand-written (stage 2+) | RN TurboModule entry point |
37
+ | `ios/PingStorageBridge.swift` | hand-written (stage 3) | Storage callback marshalling |
38
+ | `ios/PingTransportBridge.swift` | hand-written (stage 3) | Transport callback marshalling |
39
+ | `src/index.ts` | hand-written (stage 4) | JS API mirror of `ping-openmls-sdk` |
40
+ | `src/NativePing.ts` | hand-written (stage 4) | TurboModule TS spec for codegen |
41
+ | `package.json` | hand-written (stage 2) | npm metadata |
42
+ | `ping-openmls-sdk-react-native-macos.podspec` | hand-written (stage 2) | Pod descriptor for autolinking |
43
+
44
+ ## Architecture
45
+
46
+ Despite the `ios/` directory name, this Pod targets **macOS** (RN-macOS uses the same
47
+ CocoaPods conventions). The dylib in `Frameworks/` is the actual universal macOS binary;
48
+ `ios/` holds the Swift sources that load it.
49
+
50
+ See [docs/RN_NATIVE_BINDINGS.md](../../docs/RN_NATIVE_BINDINGS.md) for the full bridge
51
+ architecture, including the Storage/Transport callback marshalling pattern.
52
+
53
+ ## Non-breaking guarantees
54
+
55
+ This package and its build script (`scripts/build-macos.sh`) are entirely additive. They
56
+ do not touch:
57
+
58
+ - `bindings/swift/` (iOS xcframework)
59
+ - `bindings/kotlin/` (Android AAR)
60
+ - `sdk/js/` (web SDK)
61
+ - `core/ping-ffi/src/ping.udl` (the canonical FFI surface)
62
+ - Any existing build script or CI job
63
+
64
+ Rebuilding iOS, Android, or the WASM bundle is unaffected by this package.
package/ios/.gitkeep ADDED
File without changes