Skip to content

Conversation

@airspeedswift
Copy link
Member

This replaces a number of withUnsafe blocks with use of the .span property. This was introduced in Swift 6.2, so it does require bumping the toolchain version and minimum Mac deployment target.

Some minor performance regressions should be anticipated, as there will now be bounds checks performed where previously these were compiled out with the use of unsafe buffers. These either should be accepted as the cost of memory safety, or investigated to see if tweaks to the code structure could help the compiler eliminate them.

@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 6.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind updating the README (https://github.com/apple/swift-homomorphic-encryption?tab=readme-ov-file#swift--xcode-versions) as well?

We'll also need to add swift 6.0 & 6.1 to

linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants