22
33** Welcome to Swift!**
44
5- Swift is a high performance systems programming language. It has a clean
5+ Swift is a high- performance system programming language. It has a clean
66and modern syntax, and offers seamless access to existing C and Objective-C code
77and frameworks, and is memory safe (by default).
88
@@ -18,20 +18,20 @@ modules, eliminating the need for headers and the code duplication they entail.
1818To read the documentation, start by installing the Sphinx documentation
1919generator tool (http://sphinx-doc.org , just run ` easy_install -U Sphinx ` from
2020the command line and you're good to go). Once you have that, you can build the
21- swift documentation by going into ` swift/ docs` and typing ` make ` . This compiles
22- the ' rst' files in the docs directory into HTML in the ` swift/ docs/_build/html`
21+ Swift documentation by going into ` docs ` and typing ` make ` . This compiles
22+ the ` . rst` files in the ` docs ` directory into HTML in the ` docs/_build/html `
2323directory.
2424
25- Once built, the best place to start is with the swift whitepaper , which gives a
26- tour of the language (in ` swift/ docs/_build/html/whitepaper/index.html` ).
25+ Once built, the best place to start is with the Swift white paper , which gives a
26+ tour of the language (in ` docs/_build/html/whitepaper/index.html ` ).
2727Another potentially useful document is ` docs/LangRef ` , which gives a low level
2828tour of how the language works from the implementation perspective.
2929
3030Many of the docs are out of date, but you can see some historical design
3131documents in the ` docs ` directory.
3232
33- Another source of documentation is the standard library itself, located at
34- ` swift/ stdlib` . Much of the language is actually implemented in the library
33+ Another source of documentation is the standard library itself, located in
34+ ` stdlib ` . Much of the language is actually implemented in the library
3535(including ` Int ` ), and the standard library gives some examples of what can be
3636expressed today.
3737
@@ -66,9 +66,31 @@ compiler for C++14 support and create a symlink:
6666
6767### Getting Sources for Swift and Related Projects
6868
69+ For those checking out sources as read-only:
70+
6971 git clone https://github.com/apple/swift.git swift
70- cd swift
71- ./utils/update-checkout --clone
72+ git clone https://github.com/apple/swift-llvm.git llvm
73+ git clone https://github.com/apple/swift-clang.git clang
74+ git clone https://github.com/apple/swift-lldb.git lldb
75+ git clone https://github.com/apple/swift-cmark.git cmark
76+ git clone https://github.com/apple/swift-llbuild.git llbuild
77+ git clone https://github.com/apple/swift-package-manager.git swiftpm
78+ git clone https://github.com/apple/swift-corelibs-xctest.git
79+ git clone https://github.com/apple/swift-corelibs-foundation.git
80+
81+ For those who plan on regular making direct commits, cloning over
82+ SSH may provide a better experience (which requires uploading
83+ SSH keys to GitHub):
84+
85+ git clone [email protected] :apple/swift.git swift 86+ git clone [email protected] :apple/swift-llvm.git llvm 87+ git clone [email protected] :apple/swift-clang.git clang 88+ git clone [email protected] :apple/swift-lldb.git lldb 89+ git clone [email protected] :apple/swift-cmark.git cmark 90+ git clone [email protected] :apple/swift-llbuild.git llbuild 91+ git clone [email protected] :apple/swift-package-manager.git swiftpm 92+ git clone [email protected] :apple/swift-corelibs-xctest.git 93+ git clone [email protected] :apple/swift-corelibs-foundation.git 7294
7395[ CMake] ( http://cmake.org ) is the core infrastructure used to configure builds of
7496Swift and its companion projects; at least version 2.8.12.2 is required. Your
@@ -79,18 +101,22 @@ command line tools to your `PATH`:
79101
80102 export PATH=/Applications/CMake.app/Contents/bin:$PATH
81103
82- [ Ninja] ( http ://martine.github.io/ ninja/ ) is the current recommended build system
104+ [ Ninja] ( https ://ninja-build.org ) is the current recommended build system
83105for building Swift and is the default configuration generated by CMake. If
84106you're on OS X or don't install it as part of your Linux distribution, clone
85107it next to the other projects and it will be bootstrapped automatically:
86108
87109 git clone [email protected] :martine/ninja.git 88110
89- You can also use a third-party packaging tool like [ Homebrew ] ( http://brew.sh ) to
90- install CMake and Ninja on OS X:
111+ You can also install CMake and Ninja on OS X using a third-party
112+ packaging tool like [ Homebrew ] ( http://brew.sh ) …
91113
92114 brew install cmake ninja
93115
116+ …or [ MacPorts] ( https://macports.org ) .
117+
118+ sudo port install cmake ninja
119+
94120### Building Swift
95121
96122The ` build-script ` is a high-level build automation script that supports basic
@@ -100,30 +126,30 @@ supports presets which you can define for common combinations of build options.
100126
101127To find out more:
102128
103- swift/ utils/build-script -h
129+ utils/build-script -h
104130
105131Note: Arguments after "--" above are forwarded to ` build-script-impl ` , which is
106132the ultimate shell script that invokes the actual build and test commands.
107133
108134A basic command to build Swift and run basic tests with Ninja:
109135
110- swift/ utils/build-script -t
136+ utils/build-script -t
111137
112- ## Develop Swift in Xcode
138+ ## Developing Swift in Xcode
113139
114140The Xcode IDE can be used to edit the Swift source code, but it is not currently
115141fully supported as a build environment for SDKs other than OS X. If you'd like
116142to build for other SDKs but still use Xcode, once you've built Swift using Ninja
117143or one of the other supported CMake generators, you can set up an IDE-only Xcode
118144environment using the build-script's ` -X ` flag:
119145
120- swift/ utils/build-script -X --skip-build -- --reconfigure
146+ utils/build-script -X --skip-build -- --reconfigure
121147
122- The ` --skip-build ` flag tells build-script to only generate the project,
148+ The ` --skip-build ` flag tells ` build-script ` to only generate the project,
123149not build it in its entirety. A bare minimum of LLVM tools will build in order
124150to configure the Xcode projects.
125151
126- The ` --reconfigure ` flag tells build-script-impl to run the CMake configuration
152+ The ` --reconfigure ` flag tells ` build-script-impl ` to run the CMake configuration
127153step even if there is a cached configuration. As you develop in Xcode, you may
128154need to rerun this from time to time to refresh your generated Xcode project,
129155picking up new targets, file removals, or file additions.
@@ -135,3 +161,14 @@ See [docs/Testing.rst](docs/Testing.rst).
135161## Contributing to Swift
136162
137163Contributions to Swift are welcomed and encouraged! Please see the [ Contributing to Swift guide] ( https://swift.org/contributing/ ) .
164+
165+ To be a truly great community, Swift.org needs to welcome developers from all
166+ walks of life, with different backgrounds, and with a wide range of experience.
167+ A diverse and friendly community will have more great ideas, more unique
168+ perspectives, and produce more great code. We will work diligently to make the
169+ Swift community welcoming to everyone.
170+
171+ To give clarity of what is expected of our members, Swift has adopted the
172+ code of conduct defined by the Contributor Covenant. This document is used
173+ across many open source communities, and we think it articulates our values
174+ well. For more, see [ the website] ( https://swift.org/community/#code-of-conduct ) .
0 commit comments