Linux support#2
Merged
Merged
Conversation
RuleKit was Apple-only. The blockers were OSLog (no Linux equivalent) and firing triggers on DispatchQueue.main (the main dispatch queue isn't drained on Linux without a running run loop, so firing -- and donate() for non-delayed rules -- could hang). - Replace OSLog with swift-log (Logging). Pinned to <1.9.0 so the package keeps resolving on the Swift 6.0 toolchain (1.9+ needs tools 6.1, 1.11+ needs 6.2). This is RuleKit's first dependency. - Fire triggers on the main actor by default instead of DispatchQueue.main; an explicit .dispatchQueue(_) option is still honored. The main actor is serviced by the concurrency runtime on every platform, so no dispatchMain()/run loop is required. Same thread as before on Apple. - Guard .groupContainer with #if canImport(Darwin): app group containers don't exist on non-Apple platforms (use .url(_) on Linux). - import Dispatch explicitly where DispatchQueue is used. Verified with 'swift test' on macOS and in the swift:6.0-noble container.
Use .url(temp dir) instead of .applicationDefault so the suite is hermetic and runs on every platform -- on Linux the document directory may not exist, and this also stops the suite from writing into the developer's real Documents folder.
Run 'swift test' in the swift:{6.0,6.1}-noble containers on push/PR
(mirrors swift-ai), and add .spi.yml so Swift Package Index builds the
RuleKit documentation.
Add Linux to Requirements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.