Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Oct 24, 2024

Motivation

swift-crypto provides a common cryptography interface on macOS and Linux. On macOS it defers to CryptoKit, and although the files in the library must all be processed the compilation time is minimal.

In the past, on slower machines, avoiding processing swift-crypto on macOS seemed to improve build times by a few seconds. Currently the cost of processing these files is negligible, and using swift-crypto on Linux and macOS allows conditional includes to be removed.

Modifications

Always depend on swift-crypto in Package.swift
Replace conditional imports of CryptoKit with unconditional imports of Crypto.

Result

No functional change.

Test Plan

Automated tests continue to pass.

@euanh euanh force-pushed the unconditionally-depend-on-swift-crypto branch 3 times, most recently from 3c97a82 to 84d41a0 Compare October 24, 2024 14:17
@euanh euanh force-pushed the unconditionally-depend-on-swift-crypto branch from 84d41a0 to 7912182 Compare October 24, 2024 14:24
@euanh euanh merged commit 28325a1 into apple:main Oct 24, 2024
19 checks passed
@euanh euanh deleted the unconditionally-depend-on-swift-crypto branch October 24, 2024 14:28
@euanh euanh added the semver/none No version bump required. label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant