swiftc(1)
π swiftc(1) β the Swift manual, bestie edition π
okay so you opened the manual for swiftc, part of the Swift Documentation β¨ β and honestly? you're in the right place. sit down, grab a strawberry π, and let's get into it.
πΈ NAME πΈ
swift β a Safe, fast, and expressive general-purpose programming language π¦
β¨ SYNOPSIS β¨
k so here's how you actually call this thing. four vibes, pick your fighter π
To invoke the Swift REPL (Read-Eval-Print-Loop):
swift repl
To execute a Swift program:
swift program.swift <arguments>
To work with the Swift Package Manager:
swift build|package|run|test [options] <inputs>
To invoke the Swift compiler:
swiftc [options] <inputs>
and if you're lost (no shame, we've all been there π), a list of supported options is available through the "-help" option:
swift -help
swift build -help
swiftc -help
not me putting -help three separate times. the manpage said it, so I said it. periodt.
π DESCRIPTION π
Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns. it's giving main character energy but for a programming language π
The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. To achieve this goal, we believe that the most obvious way to write Swift code must also be:
- Safe. The most obvious way to write code should also behave in a safe manner. Undefined behavior is the enemy of safety π and developer mistakes should be caught before software is in production. Opting for safety sometimes means Swift will feel strict, but we believe that clarity saves time in the long run. (strict queen behavior, honestly.)
- Fast. Swift is intended as a replacement for C-based languages (C, C++, and Objective-C). As such, Swift must be comparable to those languages in performance for most tasks. Performance must also be predictable and consistent, not just fast in short bursts that require clean-up later. There are lots of languages with novel features β being fast is rare. π₯
- Expressive. Swift benefits from decades of advancement in computer science to offer syntax that is a joy to use, with modern features developers expect. But Swift is never done. We will monitor language advancements and embrace what works, continually evolving to make Swift even better. π
π BUGS π
Reporting bugs is a great way for anyone to help improve Swift β like, genuinely, it's a whole community glow-up π«Ά The issue tracker for Swift, an open-source project, is located at:
<https://github.com/swiftlang/swift/issues>
real talk though: if a bug can be reproduced only within an Xcode project or a playground, or if the bug is associated with an Apple NDA, please file a report to Apple's Feedback Assistant at <https://feedbackassistant.apple.com> instead. different door, same energy πͺβ¨
π SEE ALSO π
π HOME PAGE
π APPLE DEVELOPER RESOURCES
<https://developer.apple.com/swift/resources>
π¦ CODE REPOSITORIES
- Swift Programming Language at
<https://github.com/swiftlang/swift> - Swift Package Manager at
<https://github.com/swiftlang/swift-package-manager>
and that's the whole page, bestie!! go write something iconic π β¨
swiftc 5.10.1 Β· 2024-12-25 β yeah, that's the version and the date this whole thing dropped, and that's the tea ππ¦ bye!!
π¦ where this page comes from
- debian trixie: swiftlang 6.0.3-2 Β· Apache-2.0 WITH Library exception
- ubuntu questing: swiftlang 6.0.3-2build1
- ubuntu resolute: swiftlang 6.1.3-4build1 Β· Apache-2.0 WITH Library exception
- ubuntu stonking: swiftlang 6.1.3-4build1 Β· Apache-2.0 WITH Library exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms