Skip to content

Commit

Permalink
deploy : add a Package.swift for SwiftPM support (ggerganov#393)
Browse files Browse the repository at this point in the history
* Add a Package.swift for SwiftPM support

* Swap from exclusions to allowlist
  • Loading branch information
j-f1 committed Mar 28, 2023
1 parent c1f8850 commit 20e1e84
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.vscode/
.DS_Store

.build/
build/
build-em/
build-debug/
Expand All @@ -27,3 +28,7 @@ compile_commands.json

.envrc
.direnv/

.venv
__pycache__
.swiftpm
20 changes: 20 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions spm-headers/llama.h

0 comments on commit 20e1e84

Please sign in to comment.