From 993acb5d410cd8eaebaa3fc54d4b153e04bbefce Mon Sep 17 00:00:00 2001 From: Ashraful Islam Date: Wed, 3 Jan 2024 11:30:26 -0600 Subject: [PATCH] swift : update Package.swift to use ggml as package dependency (#1701) * 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 --- Package.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index bbb7fb03..a19dbf4a 100644 --- a/Package.swift +++ b/Package.swift @@ -13,9 +13,13 @@ let package = Package( products: [ .library(name: "whisper", targets: ["whisper"]), ], + dependencies: [ + .package(url: "https://github.com/ggerganov/ggml.git", .branch("master")) + ], targets: [ .target( name: "whisper", + dependencies: ["ggml"], path: ".", exclude: [ "bindings", @@ -32,14 +36,8 @@ let package = Package( "Makefile" ], sources: [ - "ggml.c", "whisper.cpp", - "ggml-alloc.c", - "ggml-backend.c", - "ggml-quants.c", - "ggml-metal.m" ], - resources: [.process("ggml-metal.metal")], publicHeadersPath: "spm-headers", cSettings: [ .unsafeFlags(["-Wno-shorten-64-to-32", "-O3", "-DNDEBUG"]),