Browser bridge in the core (shared by the Mac and desktop apps); webpki security update
- crates/kv-ipc: native-messaging framing and the local IPC socket/pipe (moved from kestrove-desktop), plus Listener::bind_in/connect_in and, on macOS, the App Group socket for the kestrove-nmh bundled in Kestrove.app (Contents/Resources/kestrove-app-group). - crates/kv-nmh: the native-messaging host, with an embedded Info.plist on macOS so it can run sandboxed (KV_NMH_BUNDLE_ID). - kv-ffi feature browser-bridge: broker, pairing channel and word list (moved from kestrove-desktop) and BrowserBridge for Swift. build-apple.sh enables it and builds a universal kestrove-nmh. - RUSTSEC-2026-0381/0382: rustls-webpki 0.103.16, webpki-roots 1.0.10 (distrusted emSign roots). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+17
-3
@@ -1,16 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds KestroveCoreFFI.xcframework + Swift bindings into ../kestrove-apple/Packages/KestroveCore.
|
||||
# Builds KestroveCoreFFI.xcframework + Swift bindings into ../kestrove-apple/Packages/KestroveCore, and the
|
||||
# universal kestrove-nmh the macOS app embeds to serve the browser extension (Packages/KestroveCore/bin).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=../kestrove-apple/Packages/KestroveCore
|
||||
LIB=libkv_ffi.a
|
||||
rustup target add aarch64-apple-ios aarch64-apple-ios-sim aarch64-apple-darwin x86_64-apple-darwin
|
||||
|
||||
# browser-bridge on every slice: the Swift bindings are generated once, so every slice must export the same API.
|
||||
for t in aarch64-apple-ios aarch64-apple-ios-sim aarch64-apple-darwin x86_64-apple-darwin; do
|
||||
cargo build -p kv-ffi --release --target "$t"
|
||||
cargo build -p kv-ffi --release --target "$t" --features browser-bridge
|
||||
done
|
||||
|
||||
cargo build -p kv-ffi # host dylib for library-mode bindgen
|
||||
export MACOSX_DEPLOYMENT_TARGET=14.0
|
||||
# The helper's bundle id (embedded Info.plist, see crates/kv-nmh/build.rs): the app's own + ".nmh".
|
||||
BUNDLE_PREFIX=$(sed -n 's/^ *BUNDLE_PREFIX: *\([A-Za-z0-9.-]*\).*/\1/p' ../kestrove-apple/project.yml | head -1)
|
||||
export KV_NMH_BUNDLE_ID="${BUNDLE_PREFIX:-app.kestrove}.nmh"
|
||||
for t in aarch64-apple-darwin x86_64-apple-darwin; do
|
||||
cargo build -p kv-nmh --release --target "$t"
|
||||
done
|
||||
|
||||
cargo build -p kv-ffi --features browser-bridge # host dylib for library-mode bindgen
|
||||
mkdir -p out/swift
|
||||
cargo run -p kv-ffi --bin uniffi-bindgen -- generate --library target/debug/libkv_ffi.dylib --language swift --out-dir out/swift
|
||||
|
||||
@@ -30,4 +40,8 @@ xcodebuild -create-xcframework \
|
||||
|
||||
mkdir -p "$OUT/Sources/KestroveCore"
|
||||
cp out/swift/kv_ffi.swift "$OUT/Sources/KestroveCore/Generated.swift"
|
||||
|
||||
mkdir -p "$OUT/bin"
|
||||
lipo -create target/aarch64-apple-darwin/release/kestrove-nmh target/x86_64-apple-darwin/release/kestrove-nmh \
|
||||
-output "$OUT/bin/kestrove-nmh"
|
||||
echo "✅ XCFramework + bindings written to $OUT"
|
||||
|
||||
Reference in New Issue
Block a user