Files
swift-mirror/docs
Max Desiatov 125a63d349 docs/WebAssembly.md: add Wasm stdlib testing steps (#85947)
Added instructions for building and running Wasm stdlib tests, including filtering options and environment variable usage.
2025-12-11 09:06:42 +00:00
..
2025-10-28 21:52:47 +00:00
2025-11-18 21:55:25 -05:00
2024-07-06 13:16:16 +02:00

Documentation Index

This page contains a curated index of the documentation found in the Swift compiler repository.

Sometimes documentation is not enough. Especially if you are a new contributor, you might run into roadblocks which are not addressed by the existing documentation. If you are stuck, please use the development category on the Swift forums to ask for help!

Building the Toolchain

  • GettingStarted.md: Describes how to set up a working Swift development environment for Linux and macOS, and get an edit-build-test-debug loop going.
  • Building for Android:
    • Android.md: How to run some simple programs and the Swift test suite on an Android device.
    • AndroidBuild.md: How to build the Swift SDK for Android on Windows.
  • Building for Windows:
  • Building for OpenBSD:
    • OpenBSD.md: Overview of specific steps for building on OpenBSD.

Contributing

  • FirstPullRequest.md: Describes how to submit your first pull request. This is the place to start if you're new to the project!
  • Branches.md: Describes how different branches are setup and what the automerger does.
  • ContinuousIntegration.md: Describes the continuous integration setup, including the @swift_ci bot.
  • DebuggingTheCompiler.md: Describes a variety of techniques for debugging.
  • FAQ.md: Answers "How do I do X?" for a variety of common tasks.
  • Lexicon.md: Canonical reference for terminology used throughout the project.
  • Testing.md: Information about running and developing tests in the compiler's test suite.

Reference Guides

  • Backtracing.rst: Describes Swift's backtracing and crash reporting support.
  • CompilerPerformance.md: Thoroughly discusses different ways of measuring compiler performance and common pitfalls.
  • EmbeddedSwift/: A guide to all things Embedded Swift.
  • Generics/: "Compiling Swift Generics", a book about the implementation of parameteric polymorphism in the Swift compiler. Also covers the compilation pipeline, request evaluator, and type system in general.
  • LibraryEvolution.rst: Specifies what changes can be made without breaking binary compatibility.
  • RequestEvaluator.md: Describes the request evaluator architecture, which is used for lazy type-checking and efficient caching.
  • SIL/: Documentation about SIL, the Swift intermediate language.
  • TypeChecker.md: Provides an overview of the expression type checker.
  • UnderscoredAttributes.md: Documents semantics for underscored (unstable) attributes in the language.

The Swift ABI

  • CallingConventionSummary.rst: A concise summary of the calling conventions used for C/C++, Objective-C and Swift on Apple platforms. Contains references to source documents, where further detail is required.
  • CallingConvention.rst: This whitepaper discusses the Swift calling convention (high-level semantics; ownership transfer; physical representation; function signature lowering).
  • KeyPaths.md: Describes the layout of key path objects (instantiated by the runtime, and therefore not strictly ABI).
    TODO: The layout of key path patterns (emitted by the compiler, to represent key path literals) isn't documented yet.
  • Mangling.rst: Describes the stable mangling scheme, which produces unique symbols for ABI-public declarations.
  • TypeLayout.rst: Describes the algorithms/strategies for fragile struct and tuple layout; class layout; fragile enum layout; and existential container layout.
  • TypeMetadata.rst: Describes the fields, values, and layout of metadata records, which can be used (by reflection and debugger tools) to discover information about types.

SIL Optimizer

  • OptimizerDesign.md: Describes the design of the optimizer pipeline.
  • HighLevelSILOptimizations.rst: Describes how the optimizer understands the semantics of high-level operations on currency data types and optimizes accordingly. Includes a thorough discussion of the @_semantics attribute.
  • HowToUpdateDebugInfo.md: A guide for SIL optimization pass authors for how to properly update debug info in SIL program transformations.
  • OptimizerCountersAnalysis.md: TODO: Consider breaking up into a how-to guide on dumping and analyzing the counters and an explanation for the counter collection system.
  • TransparentAttr.md: Documents the semantics of the @_transparent attribute.

Swift Driver

  • Driver.md: Provides an overview of the driver, compilation model, and the compiler's command-line options. Useful for integration into build systems other than SwiftPM or Xcode.
  • DriverInternals.md: Provides a bird's eye view of the driver's implementation.
  • DriverParseableOutput.md: Describes the output format of the driver's -parseable-output flag, which is suitable for consumption by editors and IDEs.
  • DependencyAnalysis.md: Describes different kinds of dependencies across files in the same module, important for understanding incremental builds.

Objective-C Interop

Rationales and Manifestos

Uncategorized