# apple/swift-atomics

Low-level atomic operations for Swift

Repository: https://github.com/apple/swift-atomics
Canonical: https://ross.abutalabs.com/products/swift-atomics
Language: Swift
License: Apache-2.0
License Family: permissive
Topics: concurrency, synchronization
Last push: 2026-08-05T21:16:45+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 58, longevity 100
- inputs: {"age_days": 2162, "days_push": 28, "days_rel": 71, "gap_med": 384, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1203, forks 63 (observed 2026-08-28T04:03:58.712522+00:00)

## What it is
A Swift package providing low-level atomic operations for integers, pointers, and other types, enabling lock-free synchronization constructs. It is largely superseded by the standard library's Atomic type in Swift 6.0 but remains supported for existing code.

## Use cases
- implement lock-free counters in swift
- build synchronization primitives in swift
- atomic integer operations across threads
- implement concurrent data structures in swift
- migrate legacy swift atomics code to stdlib

## When to choose
- maintaining existing Swift code that depends on this package
- supporting Swift versions before 6.0 that lack stdlib atomics
- building low-level synchronization constructs on older Swift toolchains

## When to avoid
- starting new Swift 6.0+ projects - use the standard library's Atomic type instead
- you need high-level concurrency tools rather than raw atomics
- you are not comfortable with the pitfalls of low-level memory ordering

## Facets
- artifact type: library
- maturity: maintenance
- function: concurrency, developer-tools
- domain: developer-tools, programming-languages
- platform: cross-platform
- tags: atomics, synchronization, lock-free, memory-ordering, swift-package, swift

## Member repositories
- apple/swift-atomics (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:58.712522+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:44.219471+00:00, confidence not recorded.
  - readme: https://github.com/apple/swift-atomics (fetched 2026-08-28T04:03:58.712522+00:00, sha 0d8bd3b00025)
- Data as of 2026-08-30T08:39:29.467469+00:00.
