mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2025-02-22 07:40:00 +00:00
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:
parent
c1f885067c
commit
20e1e84884
3 changed files with 26 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
||||||
.vscode/
|
.vscode/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
.build/
|
||||||
build/
|
build/
|
||||||
build-em/
|
build-em/
|
||||||
build-debug/
|
build-debug/
|
||||||
|
@ -27,3 +28,7 @@ compile_commands.json
|
||||||
|
|
||||||
.envrc
|
.envrc
|
||||||
.direnv/
|
.direnv/
|
||||||
|
|
||||||
|
.venv
|
||||||
|
__pycache__
|
||||||
|
.swiftpm
|
||||||
|
|
20
Package.swift
Normal file
20
Package.swift
Normal 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
|
||||||
|
)
|
1
spm-headers/llama.h
Symbolic link
1
spm-headers/llama.h
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../llama.h
|
Loading…
Reference in a new issue