🍺 BREW Explorer

← all formulae

swift

brew install swift v6.2.4 Apache-2.0 keg-only

General-purpose compiled language with static typing, memory safety, and modern syntax; includes compiler, runtime, and standard library.

Why you might care

Swift is keg-only because macOS provides its own system copy, but Homebrew's formula lets you use a newer version independently or for cross-platform development. Use it for systems programming, server applications, or iOS/macOS development outside Xcode's constraints. Fast compilation and runtime performance with strong type safety.

Categories

Alternatives

Rust Go C C++ Objective-C
2.4k
30-day installs · #896
5.7k
90-day · #1027
15.6k
365-day · #1192

Runtime dependencies

Build dependencies

Links

Caveats

An Xcode toolchain has been installed to:
  $HOMEBREW_PREFIX/opt/swift/Swift-6.2.xctoolchain

This can be symlinked for use within Xcode:
  ln -s $HOMEBREW_PREFIX/opt/swift/Swift-6.2.xctoolchain ~/Library/Developer/Toolchains/Swift-6.2.xctoolchain

Keg-only reason

:provided_by_macos

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "Rust",
    "Go",
    "C",
    "C++",
    "Objective-C"
  ],
  "build_dependencies": [
    "cmake",
    "ninja"
  ],
  "categories": [
    "language-runtime",
    "compiler"
  ],
  "caveats": "An Xcode toolchain has been installed to:\n  $HOMEBREW_PREFIX/opt/swift/Swift-6.2.xctoolchain\n\nThis can be symlinked for use within Xcode:\n  ln -s $HOMEBREW_PREFIX/opt/swift/Swift-6.2.xctoolchain ~/Library/Developer/Toolchains/Swift-6.2.xctoolchain\n",
  "conflicts_with": [],
  "dependencies": [
    "python@3.14",
    "zstd"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "High-performance system programming language",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:41:10+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "swift",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://www.swift.org",
  "homepage_og_description": "Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.",
  "homepage_og_image": "https://swift.org/apple-touch-icon-180x180.png",
  "homepage_title": "Swift Programming Language",
  "installs_30d": 2355,
  "installs_365d": 15591,
  "installs_90d": 5722,
  "keg_only": 1,
  "keg_only_reason": ":provided_by_macos",
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Apache-2.0",
  "llm_generated_at": "2026-06-20T23:47:44+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "swift",
  "oldnames": [],
  "one_liner": "General-purpose compiled language with static typing, memory safety, and modern syntax; includes compiler, runtime, and standard library.",
  "optional_dependencies": [],
  "rank_30d": 896,
  "rank_365d": 1192,
  "rank_90d": 1027,
  "raw_hash": "a2fa6a0539d9c16e",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/s/swift.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [
    {
      "llvm": "build"
    },
    {
      "rsync": "build"
    },
    "curl",
    "libedit",
    "libxml2",
    "ncurses",
    "sqlite"
  ],
  "version_head": null,
  "version_stable": "6.2.4",
  "versioned_formulae": [],
  "why_use_this": "Swift is keg-only because macOS provides its own system copy, but Homebrew\u0027s formula lets you use a newer version independently or for cross-platform development. Use it for systems programming, server applications, or iOS/macOS development outside Xcode\u0027s constraints. Fast compilation and runtime performance with strong type safety."
}