Skip to content

Instantly share code, notes, and snippets.

@profburke
Last active November 19, 2017 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save profburke/c7f8682d5c8cab9de9f4ee3ba00b7d43 to your computer and use it in GitHub Desktop.
Save profburke/c7f8682d5c8cab9de9f4ee3ba00b7d43 to your computer and use it in GitHub Desktop.

Steps to use a Swift package you are creating in the REPL. Assuming the package is named lump.

  1. Add a dynamic library product to the manifest: .library( name: "lump", type: .dyanmic, targets: ["lump"]),
  2. Build package as normal: swift build
  3. Fire up the REPL as follows: swift -I .build/debug -L .build/debug -llump

(updated for Swift 4)

@profburke
Copy link
Author

Got the Swift 4 version finished finally; took 3 tries to fix minor mistakes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment