Skip to content

Ship skit Linux release bundles #161

Description

@leogdion

The library and skit executable already compile on Linux (Subprocess is conditional on .linux, OutputCache has an XDG/~/.cache/syntaxkit branch, String+DylibFilename returns .so). Once the OutputCacheTests ProcessInfo-subclass fix lands (PR #156 follow-up), CI should go green — but we don't yet produce a runnable release bundle on Linux.

Scope

  • Add a Linux branch to Scripts/build-skit.sh (or a dedicated build-skit-linux.sh):
    • Glob .build/<linux-triple>/{debug,release} instead of .build/*-apple-macosx*/{debug,release}.
    • Copy libSyntaxKit.so instead of .dylib.
    • Replace install_name_tool -id "@rpath/libSyntaxKit.dylib" with patchelf --set-rpath '\$ORIGIN' on the binary (or --force-rpath / RUNPATH equivalents). Verify ldd resolves libSyntaxKit.so to the bundled lib/.
    • Skip strip -x (Mach-O specific) — use strip --strip-unneeded for the release equivalent.
  • Update RunCommandError.toolchainMismatchMessage and the help text in Skit+Run.swift to reference the right script path per platform (or a single platform-agnostic path that the script dispatches internally).
  • Add a CI step that runs the produced bundle end-to-end on Ubuntu (`./.build/skit-release/skit run Examples/Completed/card_game/dsl.swift`) — current Ubuntu jobs only `swift build`/`swift test`.
  • Confirm `_SwiftSyntaxCShims-include` copy still works (path is the same on Linux).
  • Document Linux bundle layout in `Docs/skit.md`.

Out of scope

  • Windows support (tracked separately).
  • A Linux Homebrew-equivalent distribution channel.

Risks

  • `swift-subprocess`'s Linux backend exercise — needs a sanity smoke test beyond what current CI does.
  • `patchelf` is the standard but not always pre-installed on minimal images; document or auto-install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions