# PcgRandom Swift 6.1 update

**URL:** <https://forums.swift.org/t/pcgrandom-swift-6-1-update/79729>\
**Category:** Community Showcase\
**Tags:** swift6\
**Created:** [May 6, 2025, 10:18pm UTC](https://forums.swift.org/t/pcgrandom-swift-6-1-update/79729 "2025-05-06T22:18:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paiv](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/paiv/32/4041_2.png) [@paiv](https://forums.swift.org/u/paiv)\
**Post date:** [May 6, 2025, 10:18pm UTC](https://forums.swift.org/t/pcgrandom-swift-6-1-update/79729/1 "2025-05-06T22:18:10Z")

</div>

Quick notes on the package update to Swift 6.1.

- [GitHub - paiv/swift-pcg-random: PCG Random for Swift language](https://github.com/paiv/swift-pcg-random)

Code changes

- Mark Pcg64Random as Sendable
- Use [Synchronization Mutex](https://developer.apple.com/documentation/synchronization/mutex), replacing legacy locking
- Use [Swift UInt128](https://developer.apple.com/documentation/swift/uint128), replacing legacy C code
- Move to Swift Testing from XCTest

Compatibility

- Swift 6.1
- macOS 15, iOS 18

In the end updated to less code, thanks new built-in primitives, but for the price of all but latest target platforms.
