deploy : add a Package.swift for SwiftPM support (#393)

* Add a Package.swift for SwiftPM support

* Swap from exclusions to allowlist
This commit is contained in:
Jed Fox 2023-03-28 11:39:01 -05:00 committed by GitHub
parent c1f885067c
commit 20e1e84884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

20
Package.swift Normal file
View file

@ -0,0 +1,20 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "llama",
products: [
.library(name: "llama", targets: ["llama"]),
],
targets: [
.target(
name: "llama",
path: ".",
sources: ["ggml.c", "llama.cpp"],
publicHeadersPath: "spm-headers",
cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"])]
),
],
cxxLanguageStandard: .cxx11
)