Skip to content

Conversation

@Skyline-23
Copy link

@Skyline-23 Skyline-23 commented Nov 16, 2025

This pull request updates the Swift package to add cryptographic support and refactors download progress reporting. The main changes include adding the swift-crypto dependency, updating imports to use the new crypto library, and revising documentation to clarify progress reporting via AsyncStream.

To increase Cross-Platform Compatibility for Tokenizer Support on Linux and Windows

Dependency updates:

Added swift-crypto as a new package dependency in Package.swift, and included Crypto as a dependency for the Hub target.
Codebase refactoring:

Updated import statements to use Crypto instead of CryptoKit in Sources/Hub/HubApi.swift.
Removed unused Combine import from Sources/Hub/Downloader.swift and Tests/HubTests/DownloaderTests.swift. [1] [2]
Removed ObservableObject conformance from the Downloader class, as progress reporting is now handled via AsyncStream.
Documentation improvements:

Revised comments in HubApi.swift to clarify that download progress is emitted via AsyncStream, and that a Combine wrapper can be added if needed for SwiftUI integration.This pull request refactors the progress reporting mechanism in the Downloader class and updates related documentation and tests. The main change is the removal of Combine-based progress reporting in favor of using AsyncStream, with guidance for bridging to Combine if necessary. This simplifies the downloader’s interface and clarifies its intended usage.
Progress reporting and API documentation:

Updated the documentation in HubApi to clarify that Downloader now emits progress updates via AsyncStream, and that a Combine wrapper can be added if needed for SwiftUI compatibility.
Codebase simplification:

Removed ObservableObject conformance from the Downloader class in Downloader.swift, reflecting the shift away from Combine-based progress reporting.
Removed the unused Combine import from both Downloader.swift and DownloaderTests.swift, cleaning up dependencies. [1] [2]

@mattt
Copy link
Collaborator

mattt commented Nov 16, 2025

Hi @Skyline-23. I see that you closed #287 and opened this new PR, which appears to make the same changes. Could you please re-open #287 and continue developing that? You can do git push --force to rewrite history on that PR branch.

@mattt mattt closed this Nov 16, 2025
@Skyline-23
Copy link
Author

@mattt Thanks for the note. You're right — these changes belong in #287.
I’ll restore the branch and force-push the updated commits so that we can continue the review there.
Sorry for the confusion!

@Skyline-23 Skyline-23 deleted the feature/increase-compatibility branch November 16, 2025 13:40
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