Swift/iOS binding for Minigraf — zero-config, single-file, embedded bi-temporal graph database with Datalog queries.
In Xcode: File → Add Package Dependencies → enter this repo URL.
Or add to Package.swift:
dependencies: [
.package(url: "https://github.com/project-minigraf/minigraf-swift", from: "1.2.0")
]SPM resolves via the
swift-v<version>tag which points to theswift-releasesbranch containing the updatedPackage.swiftand generated Swift sources.
Requires iOS 16+.
import MinigrafKit
let db = try MiniGrafDb.openInMemory()
let result = try db.execute(datalog: #"(transact [[:alice :name "Alice"]])"#)
print(result) // {"transacted":1}Requires Rust stable toolchain with iOS targets and Xcode.
rustup target add aarch64-apple-ios aarch64-apple-ios-sim
cargo build --target aarch64-apple-ios --release
cargo build --target aarch64-apple-ios-sim --release
cargo run --bin uniffi-bindgen -- generate \
--library target/aarch64-apple-ios/release/libminigraf_ffi.a \
--language swift \
--out-dir Sources/MinigrafKit/This repo receives a core-release repository_dispatch from the minigraf monorepo
cascade whenever a new version of the minigraf core crate is published. The release
workflow pins the new version, builds the xcframework for iOS device and simulator,
zips it, creates a GitHub Release, and updates Package.swift on the swift-releases branch.
MIT OR Apache-2.0