Skip to content

Linux support#2

Merged
Dean151 merged 6 commits into
mainfrom
linux-support
Jun 18, 2026
Merged

Linux support#2
Dean151 merged 6 commits into
mainfrom
linux-support

Conversation

@Dean151

@Dean151 Dean151 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

Dean151 added 6 commits June 18, 2026 01:41
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.
@Dean151 Dean151 merged commit d635e9b into main Jun 18, 2026
2 checks passed
@Dean151 Dean151 deleted the linux-support branch June 18, 2026 17:14
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.

1 participant