Skip to content

This repository demonstrates how to use swift-package-manager to build a project that depends on a library artifactbundle.

Notifications You must be signed in to change notification settings

xtyxtyx/spm-binary-library-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository demonstrates how to use swift-package-manager to build a project that depends on a library artifactbundle.

Usage

  1. Clone and build the modified swift-package-manager with support for library artifactbundle:
git clone https://github.com/xtyxtyx/swift-package-manager.git
cd swift-package-manager
swift build

After building, the swift-build executable will be located at .build/debug/swift-build.

On Windows, a development snapshot of Swift is required to build swift-package-manager due to a bug in stable release(5.10.1 as of writing).

  1. Clone and build the example project:
git clone https://github.com/xtyxtyx/spm-binary-library-simple.git
cd spm-binary-library-simple
../swift-package-manager/.build/debug/swift-build  # This is the swift-build executable built in step 1

If everything goes well, you should see the following output:

Building for debugging...
ld: warning: object file (/Users/mac/code/spm-binary-library-simple/.build/arm64-apple-macosx/debug/libtest.a[2](libtest.o)) was built for newer 'macOS' version (15.0) than being linked (11.0)
[9/9] Applying BinaryLibraryDemo
Build complete! (0.59s)

And then you can run the executable:

.build/debug/BinaryLibraryDemo

About

This repository demonstrates how to use swift-package-manager to build a project that depends on a library artifactbundle.

Resources

Stars

Watchers

Forks