1-ashraful-islam commited on
Commit
77f731f
·
unverified ·
1 Parent(s): 92f24ee

swift : update Package.swift to use ggml as package dependency (#1701)

Browse files

* updates Package.swift to use ggml as dependency

* cleans up the Package.swift file by removing redundant source files

* updates ggml url src to ggerganov

Files changed (1) hide show
  1. Package.swift +4 -6
Package.swift CHANGED
@@ -13,9 +13,13 @@ let package = Package(
13
  products: [
14
  .library(name: "whisper", targets: ["whisper"]),
15
  ],
 
 
 
16
  targets: [
17
  .target(
18
  name: "whisper",
 
19
  path: ".",
20
  exclude: [
21
  "bindings",
@@ -32,14 +36,8 @@ let package = Package(
32
  "Makefile"
33
  ],
34
  sources: [
35
- "ggml.c",
36
  "whisper.cpp",
37
- "ggml-alloc.c",
38
- "ggml-backend.c",
39
- "ggml-quants.c",
40
- "ggml-metal.m"
41
  ],
42
- resources: [.process("ggml-metal.metal")],
43
  publicHeadersPath: "spm-headers",
44
  cSettings: [
45
  .unsafeFlags(["-Wno-shorten-64-to-32", "-O3", "-DNDEBUG"]),
 
13
  products: [
14
  .library(name: "whisper", targets: ["whisper"]),
15
  ],
16
+ dependencies: [
17
+ .package(url: "https://github.com/ggerganov/ggml.git", .branch("master"))
18
+ ],
19
  targets: [
20
  .target(
21
  name: "whisper",
22
+ dependencies: ["ggml"],
23
  path: ".",
24
  exclude: [
25
  "bindings",
 
36
  "Makefile"
37
  ],
38
  sources: [
 
39
  "whisper.cpp",
 
 
 
 
40
  ],
 
41
  publicHeadersPath: "spm-headers",
42
  cSettings: [
43
  .unsafeFlags(["-Wno-shorten-64-to-32", "-O3", "-DNDEBUG"]),