-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPackage.swift
More file actions
45 lines (44 loc) · 1.67 KB
/
Package.swift
File metadata and controls
45 lines (44 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "PhemyNative",
platforms: [
.macOS(.v14)
],
targets: [
// System library target wrapping the Rust static library
.systemLibrary(
name: "CPhemyCore",
path: "Sources/CPhemyCore"
),
.executableTarget(
name: "PhemyNative",
dependencies: ["CPhemyCore"],
path: "Sources/PhemyNative",
resources: [
.copy("Resources")
],
linkerSettings: [
.unsafeFlags([
"-L", ".", // libphemy_core.dylib in project root
]),
.linkedLibrary("phemy_core"),
.linkedLibrary("c++"), // whisper.cpp / llama.cpp need C++ stdlib
// System frameworks needed by Rust dependencies
.linkedFramework("CoreAudio"),
.linkedFramework("AudioToolbox"),
.linkedFramework("CoreFoundation"),
.linkedFramework("Security"),
.linkedFramework("SystemConfiguration"),
.linkedFramework("AppKit"),
.linkedFramework("CoreGraphics"),
.linkedFramework("Accelerate"), // ggml BLAS/vDSP
.linkedFramework("Carbon"), // enigo keyboard input source
.linkedFramework("Metal"), // llama.cpp Metal GPU
.linkedFramework("MetalKit"), // llama.cpp Metal
.linkedFramework("MetalPerformanceShaders"),
.linkedFramework("Foundation"),
]
)
]
)