8000 GitHub - project-minigraf/minigraf-swift at v1.2.3 · GitHub
[go: up one dir, main page]

Skip to content
  • About

    Swift/iOS binding for Minigraf — bi-temporal graph database

    Resources

    Stars

    1 star

    Watchers

    0 watching

    Forks

    Repository files navigation

    minigraf-swift

    Swift/iOS binding for Minigraf — zero-config, single-file, embedded bi-temporal graph database with Datalog queries.

    Installation

    Swift Package Manager

    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 the swift-releases branch containing the updated Package.swift and generated Swift sources.

    Requires iOS 16+.

    Quick start

    import MinigrafKit
    
    let db = try MiniGrafDb.openInMemory()
    let result = try db.execute(datalog: #"(transact [[:alice :name "Alice"]])"#)
    print(result)  // {"transacted":1}

    Building from source

    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/

    Cascade release

    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.

    License

    MIT OR Apache-2.0

    About

    Swift/iOS binding for Minigraf — bi-temporal graph database

    Resources

    Stars

    1 star

    Watchers

    0 watching

    Forks

    Releases

    Packages

    Contributors

    Languages

    0