GithubHelp home page GithubHelp logo

doc22940 / swift-package-manager Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5.1 MB

License: Apache License 2.0

Emacs Lisp 0.03% CMake 0.81% C 0.73% Swift 95.40% C++ 0.01% Objective-C 0.06% Shell 0.31% Python 2.61% Dockerfile 0.04%

swift-package-manager's Introduction

Swift Package Manager Project

The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code and reuse others’ code. The tool directly addresses the challenges of compiling and linking Swift packages, managing dependencies, versioning, and supporting flexible distribution and collaboration models.

We’ve designed the system to make it easy to share packages on services like GitHub, but packages are also great for private personal development, sharing code within a team, or at any other granularity.

Swift Package Manager includes a build system that can build for macOS and Linux. Xcode 11 integrates with libSwiftPM to provide support for iOS, watchOS, and tvOS platforms.

The SourceKit-LSP project leverages libSwiftPM and provides Language Server Protocol implementation for editors that support LSP.


Table of Contents


Getting Started

Please use this guide for learning package manager basics.


Documentation

For Quick Help use the swift package --help command.

For extensive documentation on using Swift Package Manager, creating packages, and more, see Documentation.

For additional documentation on developing the Swift Package Manager itself, see Documentation/Development.


System Requirements

The package manager’s system requirements are the same as those for Swift with the caveat that the package manager requires Git at runtime as well as build-time.


Installation

The Swift Package Manager is included in Xcode 8.0 and all subsequent releases.

The package manager is also available for other platforms as part of all Snapshots available at swift.org, including snapshots for the latest versions built from master. For installation instructions for downloaded snapshots, please see the Getting Started section of swift.org.

You can verify your installation by typing swift package --version in a terminal:

$ swift package --version
Apple Swift Package Manager - ...

Managing Swift Environments

On macOS /usr/bin/swift is just a stub that forwards invocations to the active toolchain. Thus when you call swift build it will use the swift defined by your TOOLCHAINS environment variable. This can be used to easily switch between the default tools, and a development snapshot:

$ xcrun --find swift
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
$ swift --version
Apple Swift version 3.0
$ export TOOLCHAINS=swift
$ xcrun --find swift
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift
$ swift --version
Swift version 3.0-dev

To use a specific toolchain you can set TOOLCHAINS to the CFBundleIdentifier in an .xctoolchain’s Info.plist.

Choosing a Swift Version

The SWIFT_EXEC environment variable specifies the swiftc executable path used by swift package. If it is not set, the package manager will try to locate it:

  1. In swift-package's parent directory.
  2. On macOS, by calling xcrun --find swiftc.
  3. By searching the PATH.

Support

If you have any trouble with the package manager, help is available. We recommend:

When adding a bug to the tracker you should follow the bug reporting guidelines, they can be found in Resources.md.

If you’re not comfortable sharing your question with the list, contact details for the code owners can be found in CODEOWNERS; however, the mailing list is usually the best place to go for help.


Contributions

To learn about the policies and best practices that govern contributions to the Swift project, please read the Contributor Guide.

If you are interested in contributing, please read the Community Proposal, which provides some context for decisions made in the current implementation and offers direction for the development of future features.

Instructions for setting up the development environment are available here.

The Swift package manager uses llbuild as the underlying build system for compiling source files. It is also open source and part of the Swift project.


License

Copyright 2015 - 2019 Apple Inc. and the Swift project authors. Licensed under Apache License v2.0 with Runtime Library Exception.

See https://swift.org/LICENSE.txt for license information.

See https://swift.org/CONTRIBUTORS.txt for Swift project authors.

swift-package-manager's People

Contributors

abertelrud avatar aciidb0mb3r avatar aemino avatar bhargavg avatar bouke avatar briancroom avatar compnerd avatar czechboy0 avatar ddunbar avatar emish avatar giginet avatar gmittert avatar gribozavr avatar hartbit avatar jakepetroules avatar kiliankoe avatar kostiakoval avatar krzyzanowskim avatar lattner avatar milseman avatar modocache avatar mxcl avatar neonichu avatar norio-nomura avatar onevcat avatar pducks32 avatar rballard avatar swift-ci avatar therealbnut avatar yasumoto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.