SwiftPM distribution of the BAML Swift
bridge: the BamlBridge runtime package plus the BamlBridgeFFI native
XCFramework (macOS arm64/x86_64, iOS device, iOS simulator).
This repo is a passive mirror. Nothing here is edited by hand. The monorepo's release pipeline builds the XCFramework, attaches it to the
baml-language-<version>release onBoundaryML/baml, and mirrors this tree (sources + aPackage.swiftpinned at that release asset) here on every release. Source of truth:BoundaryML/baml→baml_language/sdks/swift. iOS slices compile and pass simulator tests but are not yet device-certified.
// Package.swift
.package(url: "https://github.com/BoundaryML/baml-swift", from: "0.15.0")In Xcode: File → Add Package Dependencies → paste the URL → pin a
version → add the BamlBridge product to your app target.
Each release is an immutable v<version> tag; Package.swift's binary
target points at the matching XCFramework asset on the monorepo release,
verified by checksum. Your app links only its own architecture (~26 MB).
The package is the runtime; your typed Baml.* API is generated by the
baml CLI from your .baml project (nothing generated ships here):
baml toolchain use nightly # or a release matching this package's version
baml generate --from /path/to/your-baml-projectThe generated SDK and this package must share a canonical version (the
register_bridge handshake). The exact source commit each release was
built from is recorded in SOURCE_SHA.
Minimums: iOS 16 / macOS 13.