Skip to content

Commit 20e1e84

Browse files
authored
deploy : add a Package.swift for SwiftPM support (ggml-org#393)
* Add a Package.swift for SwiftPM support * Swap from exclusions to allowlist
1 parent c1f8850 commit 20e1e84

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.vscode/
66
.DS_Store
77

8+
.build/
89
build/
910
build-em/
1011
build-debug/
@@ -27,3 +28,7 @@ compile_commands.json
2728

2829
.envrc
2930
.direnv/
31+
32+
.venv
33+
__pycache__
34+
.swiftpm

Package.swift

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "llama",
7+
products: [
8+
.library(name: "llama", targets: ["llama"]),
9+
],
10+
targets: [
11+
.target(
12+
name: "llama",
13+
path: ".",
14+
sources: ["ggml.c", "llama.cpp"],
15+
publicHeadersPath: "spm-headers",
16+
cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"])]
17+
),
18+
],
19+
cxxLanguageStandard: .cxx11
20+
)

spm-headers/llama.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../llama.h

0 commit comments

Comments
 (0)