From 2c5f5acf3021d279c425229e3da9765b7a4dfb82 Mon Sep 17 00:00:00 2001 From: Steven Prichard Date: Thu, 8 Aug 2024 12:21:42 -0500 Subject: [PATCH] Create Swift Package - Currently not building --- .gitignore | 4 +++- Package.swift | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index 38f9876..08132e8 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,6 @@ sqlite-vec.h tmp/ poetry.lock -pyproject.toml \ No newline at end of file +pyproject.toml + +.swiftpm \ No newline at end of file diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..2b78f12 --- /dev/null +++ b/Package.swift @@ -0,0 +1,44 @@ +// swift-tools-version:5.10 +import PackageDescription + +let sources = [ + "sqlite-vec.c", + "sqlite-vec.h", + "sqlite3ext.h", + "sqlite3.h" +] + +let package = Package( + name: "SQLiteVec", + platforms: [ + .iOS(.v17) + ], + products: [ + .library( + name: "SQLiteVec", + type: .static, + targets: ["SQLiteVec"] + ) + ], + targets: [ + .target( + name: "SQLiteVec", + path: ".", + sources: sources, + publicHeadersPath: ".", + cSettings: [ + .headerSearchPath(".") + ], + swiftSettings: [ + .interoperabilityMode(.C) + ] + ), +// .testTarget( +// name: "SQLiteVecTests", +// dependencies: [ +// .product(name: "SQLiteVec") +// ] +// ) + ], + cxxLanguageStandard: .cxx11 +)