MyGit

swiftlang/swift

Fork: 10376 Star: 67648 (更新于 2024-11-25 13:26:37)

license: Apache-2.0

Language: C++ .

The Swift Programming Language

最后发布版本: swift-5.10.1-RELEASE ( 2024-06-07 02:25:16)

官方网址 GitHub网址

Swift logo

Swift Programming Language

Architecture Build
macOS x86_64 Build Status
Ubuntu 20.04 x86_64 Build Status
Ubuntu 20.04 AArch64 Build Status
Ubuntu 22.04 x86_64 Build Status
Ubuntu 22.04 AArch64 Build Status
Ubuntu 24.04 x86_64 Build Status
Ubuntu 24.04 AArch64 Build Status
Amazon Linux 2 x86_64 Build Status
Amazon Linux 2 AArch64 Build Status
Universal Base Image 9 x86_64 Build Status
Debian 12 x86_64 Build Status
Debian 12 AArch64 Build Status
Fedora 39 x86_64 Build Status
Fedora 39 AArch64 Build Status
Windows 10 x86_64 Build Status
Windows 10 ARM64 Build Status

Cross-Compilation Targets

Target Build
wasm32-unknown-wasi Build Status

Swift Community-Hosted CI Platforms

OS Architecture Build
Android ARMv7 Build Status
Android AArch64 Build Status
Windows 2019 (VS 2019) x86_64 Build Status

Welcome to Swift

Swift is a high-performance system programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory-safe by default.

Although inspired by Objective-C and many other languages, Swift is not itself a C-derived language. As a complete and independent language, Swift packages core features like flow control, data structures, and functions, with high-level constructs like objects, protocols, closures, and generics. Swift embraces modules, eliminating the need for headers and the code duplication they entail.

To learn more about the programming language, visit swift.org.

Contributing to Swift

Contributions to Swift are welcomed and encouraged! Please see the Contributing to Swift guide.

Before submitting the pull request, please make sure you have tested your changes and that they follow the Swift project guidelines for contributing code.

To be a truly great community, Swift.org needs to welcome developers from all walks of life, with different backgrounds, and with a wide range of experience. A diverse and friendly community will have more great ideas, more unique perspectives, and produce more great code. We will work diligently to make the Swift community welcoming to everyone.

To give clarity of what is expected of our members, Swift has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the Code of Conduct.

Getting Started

If you are interested in:

We also have an FAQ that answers common questions.

Swift Toolchains

Building

Swift toolchains are created using the script build-toolchain. This script is used by swift.org's CI to produce snapshots and can allow for one to locally reproduce such builds for development or distribution purposes. A typical invocation looks like the following:

  $ ./swift/utils/build-toolchain $BUNDLE_PREFIX

where $BUNDLE_PREFIX is a string that will be prepended to the build date to give the bundle identifier of the toolchain's Info.plist. For instance, if $BUNDLE_PREFIX was com.example, the toolchain produced will have the bundle identifier com.example.YYYYMMDD. It will be created in the directory you run the script with a filename of the form: swift-LOCAL-YYYY-MM-DD-a-osx.tar.gz.

Beyond building the toolchain, build-toolchain also supports the following (non-exhaustive) set of useful options:

  • --dry-run: Perform a dry run build. This is off by default.
  • --test: Test the toolchain after it has been compiled. This is off by default.
  • --distcc: Use distcc to speed up the build by distributing the C++ part of the swift build. This is off by default.
  • --sccache: Use sccache to speed up subsequent builds of the compiler by caching more C++ build artifacts. This is off by default.

More options may be added over time. Please pass --help to build-toolchain to see the full set of options.

Installing into Xcode

On macOS if one wants to install such a toolchain into Xcode:

  1. Untar and copy the toolchain to one of /Library/Developer/Toolchains/ or ~/Library/Developer/Toolchains/. E.g.:
  $ sudo tar -xzf swift-LOCAL-YYYY-MM-DD-a-osx.tar.gz -C /
  $ tar -xzf swift-LOCAL-YYYY-MM-DD-a-osx.tar.gz -C ~/

The script also generates an archive containing debug symbols which can be installed over the main archive allowing symbolication of any compiler crashes.

  $ sudo tar -xzf swift-LOCAL-YYYY-MM-DD-a-osx-symbols.tar.gz -C /
  $ tar -xzf swift-LOCAL-YYYY-MM-DD-a-osx-symbols.tar.gz -C ~/
  1. Specify the local toolchain for Xcode's use via Xcode->Toolchains.

Build Failures

Try the suggestions in Troubleshooting build issues.

Make sure you are using the correct release of Xcode.

If you have changed Xcode versions but still encounter errors that appear to be related to the Xcode version, try passing --clean to build-script.

When a new version of Xcode is released, you can update your build without recompiling the entire project by passing --reconfigure to build-script.

Learning More

Be sure to look at the documentation index for a bird's eye view of the available documentation. In particular, the documents titled Debugging the Swift Compiler and Continuous Integration for Swift are very helpful to understand before submitting your first PR.

最近版本更新:(数据更新于 2024-09-09 09:49:14)

2024-06-07 02:25:16 swift-5.10.1-RELEASE

2024-03-06 06:01:03 swift-5.10-RELEASE

2023-12-12 05:19:40 swift-5.9.2-RELEASE

2023-10-20 04:06:50 swift-5.9.1-RELEASE

2023-09-19 01:41:31 swift-5.9-RELEASE

2023-06-02 02:10:11 swift-5.8.1-RELEASE

2023-03-31 07:58:30 swift-5.8-RELEASE

2023-01-20 00:16:47 swift-5.7.3-RELEASE

2022-12-15 03:25:33 swift-5.7.2-RELEASE

2022-11-04 03:50:01 swift-5.7.1-RELEASE

swiftlang/swift同语言 C++最近更新仓库

2024-12-20 06:20:01 ClickHouse/ClickHouse

2024-12-20 00:12:10 LizardByte/Sunshine

2024-12-17 13:11:45 cxasm/notepad--

2024-12-16 20:00:54 AaronFeng753/Waifu2x-Extension-GUI

2024-12-16 15:51:57 PCSX2/pcsx2

2024-12-15 21:09:04 MaaAssistantArknights/MaaAssistantArknights