mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 05:43:58 +00:00
Minimal iOS App Clip template that bridges into the RVF C FFI to decode QR cognitive seeds. Includes SPM package config linking librvf_runtime.a, a C header mirroring ffi.rs exports (rvqs_parse_header, rvqs_verify_signature, rvqs_verify_content_hash, rvqs_decompress_microkernel, rvqs_get_primary_host_url), a Swift SeedDecoder wrapper with proper memory management, and a SwiftUI view with QR scanner placeholder and decoded seed info display. https://claude.ai/code/session_01RnwD4x5cbpB7FPvoyYQz8G
42 lines
1.2 KiB
Swift
42 lines
1.2 KiB
Swift
// swift-tools-version: 5.9
|
|
// Package.swift — SPM manifest for the RVF App Clip skeleton.
|
|
//
|
|
// This package links the pre-built RVF static library (librvf_runtime.a)
|
|
// produced by:
|
|
// cargo build --release --target aarch64-apple-ios --lib
|
|
//
|
|
// Place the compiled .a file under lib/ before building with Xcode.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "RVFAppClip",
|
|
platforms: [
|
|
.iOS(.v16),
|
|
],
|
|
products: [
|
|
.library(
|
|
name: "AppClip",
|
|
targets: ["AppClip"]
|
|
),
|
|
],
|
|
targets: [
|
|
// C bridge module that exposes the RVF FFI header to Swift.
|
|
.target(
|
|
name: "RVFBridge",
|
|
path: "Sources/RVFBridge",
|
|
publicHeadersPath: ".",
|
|
linkerSettings: [
|
|
// Link the pre-built Rust static library.
|
|
.unsafeFlags(["-L../../target/aarch64-apple-ios/release"]),
|
|
.linkedLibrary("rvf_runtime"),
|
|
]
|
|
),
|
|
// Swift App Clip target that consumes the C bridge.
|
|
.target(
|
|
name: "AppClip",
|
|
dependencies: ["RVFBridge"],
|
|
path: "Sources/AppClip"
|
|
),
|
|
]
|
|
)
|