-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPackage.swift
More file actions
111 lines (108 loc) · 3.85 KB
/
Package.swift
File metadata and controls
111 lines (108 loc) · 3.85 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// swift-tools-version: 6.2
import PackageDescription
import Foundation
let bridgingHeader = URL(fileURLWithPath: #filePath)
.deletingLastPathComponent()
.appendingPathComponent("Sources/EngramVisualizer/EngramVisualizer-Bridging-Header.h")
.path
let package = Package(
name: "Engram",
platforms: [.macOS(.v15)],
products: [
.library(name: "EngramKit", targets: ["EngramKit"]),
.library(name: "EngramModels", targets: ["EngramModels"]),
],
dependencies: [
.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.10.0"),
.package(url: "https://github.com/jsflax/lattice", from: "0.4.1"),
.package(url: "https://github.com/jsflax/SwiftLM.git", branch: "main"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
.package(url: "https://github.com/sparkle-project/Sparkle.git", from: "2.0.0"),
.package(url: "https://github.com/google/GoogleSignIn-iOS.git", from: "7.0.0"),
],
targets: [
.target(
name: "EngramModels",
dependencies: [
.product(name: "Lattice", package: "Lattice"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
),
.target(
name: "EngramKit",
dependencies: [
"EngramModels",
.product(name: "MCP", package: "swift-sdk"),
.product(name: "Lattice", package: "Lattice"),
.product(name: "SwiftLM", package: "SwiftLM"),
],
resources: [
.copy("Resources/paraphrase-MiniLM-L6-v2_Embedding.mlmodelc"),
.copy("Resources/paraphrase-MiniLM-L6-v2_tokenizer"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
],
linkerSettings: [
.linkedFramework("Accelerate"),
.linkedFramework("NaturalLanguage"),
]
),
.executableTarget(
name: "Engram",
dependencies: [
"EngramKit",
.product(name: "MCP", package: "swift-sdk"),
.product(name: "Lattice", package: "Lattice"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
),
.executableTarget(
name: "EngramVisualizer",
dependencies: [
"EngramKit",
.product(name: "Lattice", package: "Lattice"),
.product(name: "Sparkle", package: "Sparkle"),
.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS"),
.product(name: "GoogleSignInSwift", package: "GoogleSignIn-iOS"),
],
resources: [
.copy("Resources/under_construction.png"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
.unsafeFlags(["-import-objc-header", bridgingHeader]),
],
linkerSettings: [
.linkedFramework("Metal"),
.linkedFramework("MetalKit"),
.linkedFramework("RealityKit"),
]
),
.executableTarget(
name: "EngramHooks",
dependencies: [
"EngramKit",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Lattice", package: "Lattice"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
),
.testTarget(
name: "EngramTests",
dependencies: [
"EngramKit",
.product(name: "Lattice", package: "Lattice"),
],
swiftSettings: [
.interoperabilityMode(.Cxx),
]
),
]
)