Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift : revert package changes #11650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jhen0409
Copy link
Collaborator

@jhen0409 jhen0409 commented Feb 4, 2025

This reverts #10525 and make swift package works at latest commit.

Reasons:

  • The swift package can't run cmake if llama.cpp is imported from SPM by any Xcode project. For example, we should able to use llama package by add to Package Dependencies:
Screenshot 2025-02-04 at 16 22 10
  • If we want to build llama-swiftui example for other platform like visionOS or tvOS, the building process will being complicated.

We may can include dylib or xcframework to the package, but we would need upload binaries to other places and use binaryTarget.

@jhen0409 jhen0409 requested a review from slaren February 4, 2025 08:37
@github-actions github-actions bot added the devops improvements to build systems and github actions label Feb 4, 2025
@jhen0409 jhen0409 marked this pull request as ready for review February 4, 2025 08:46
@slaren
Copy link
Collaborator

slaren commented Feb 4, 2025

The problem is still that duplicating the build process in Package.swift is not reasonable. The build script is updated continuously, and it is simply not reasonable to duplicate all the behavior of the cmake build scripts in the Package.swift. The solution must be able to use cmake to build llama.cpp.

I don't know anything about Swift, that was just the solution that I found after a quick search, but I am sure that a experienced Swift programmer could come up with a solution that satisfies all the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops improvements to build systems and github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants