-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathPackage.swift
More file actions
50 lines (47 loc) · 2.47 KB
/
Package.swift
File metadata and controls
50 lines (47 loc) · 2.47 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
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
/// Define the strict concurrency settings to be applied to all targets.
let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency")
]
let package = Package(
name: "swift-transformers",
platforms: [.iOS(.v16), .macOS(.v13)],
products: [
.library(name: "Hub", targets: ["Hub"]),
.library(name: "Tokenizers", targets: ["Tokenizers"]),
.library(name: "Transformers", targets: ["Tokenizers", "Generation", "Models"]),
],
dependencies: [
.package(url: "https://github.com/huggingface/swift-jinja.git", from: "2.0.0"),
.package(url: "https://github.com/huggingface/swift-huggingface.git", from: "0.8.1"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "3.0.0"..<"5.0.0"),
.package(url: "https://github.com/ibireme/yyjson.git", exact: "0.12.0"),
],
targets: [
.target(name: "Generation", dependencies: ["Tokenizers"]),
.target(
name: "Hub",
dependencies: [
.product(name: "Jinja", package: "swift-jinja"),
.product(name: "HuggingFace", package: "swift-huggingface"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "yyjson", package: "yyjson"),
],
resources: [
.process("Resources")
],
swiftSettings: swiftSettings
),
.target(name: "Models", dependencies: ["Tokenizers", "Generation"]),
.target(name: "Tokenizers", dependencies: ["Hub", .product(name: "Jinja", package: "swift-jinja")]),
.testTarget(name: "Benchmarks", dependencies: ["Hub", "Tokenizers", .product(name: "yyjson", package: "yyjson")]),
.testTarget(name: "GenerationTests", dependencies: ["Generation"]),
.testTarget(name: "HubTests", dependencies: ["Hub", .product(name: "Jinja", package: "swift-jinja")], swiftSettings: swiftSettings),
.testTarget(name: "ModelsTests", dependencies: ["Models", "Hub"], resources: [.process("Resources")]),
.testTarget(name: "TokenizersTests", dependencies: ["Tokenizers", "Models", "Hub"], resources: [.process("Resources")]),
]
)