> ## Documentation Index
> Fetch the complete documentation index at: https://boutiquedb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Building the Engine

> Instructions for building the Rust engine binary (libturso_sdk_kit) and multi-arch XCFramework.

While consumer developers integrate BoutiqueDB as a precompiled Swift package, contributors modifying the underlying Rust engine can rebuild `TursoSDK.xcframework` using provided build scripts.

***

## Prerequisites

* macOS 14.0+ with Xcode 15+
* Rust toolchain (`rustup` with `aarch64-apple-darwin`, `x86_64-apple-darwin`, `aarch64-apple-ios`, `aarch64-apple-ios-sim`, `x86_64-apple-ios` targets installed).

***

## Build Execution

Run the universal multi-arch packaging script from the repository root:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Build XCFramework containing macOS and iOS (Device + Simulator) slices
./Scripts/build-turso-sdk-xcframework.sh
```

> [!NOTE]
>
> **Local Single-Slice Debugging**: For faster iteration during local debugging on Apple Silicon Macs, build a single slice using `SLICES=macos-arm64 ./Scripts/build-turso-sdk-xcframework.sh`.

***

## Verification & Checksum Update

1. Verify XCFramework architecture slices:
   ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
   lipo -info Vendor/TursoSDK.xcframework/macos-arm64_x86_64/libturso_sdk_kit.a
   ```
2. Recompute zip checksum for `Package.swift`:
   ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
   swift package compute-checksum Vendor/TursoSDK.xcframework.zip
   ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.