swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

Windows platform support

Open cmcgee1024 opened this issue 1 year ago • 4 comments
trafficstars

Swiftly currently only support Linux and macOS. It could support the Windows platform too.

cmcgee1024 avatar Aug 06 '24 13:08 cmcgee1024

Some issues that we expect with Windows that might affect how Swiftly supports it:

  • Only a single toolchain can be installed at a time with the current installer
  • Symlinks work differently
  • C runtime downloads and configuration will require some investigation and may require user documentation for setup
  • Trust mechanisms of the binaries work differently

cmcgee1024 avatar Aug 06 '24 13:08 cmcgee1024

Only one development snapshot can be installed. However, in theory multiple toolchain releases can be installed in parallel (5.7+). The problem is in the runtime which is not versioned or ABI stable.

compnerd avatar Aug 06 '24 13:08 compnerd

Hey, I'd be interested in trying to help with this effort when I have free cycles. Currently I am getting:

C:\Users\patri\Source\repos\swiftly\.build\checkouts\swift-openapi-generator\Sources\_OpenAPIGeneratorCore\PlatformChecks.swift:21:5: error: _OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.
19 | #if !(os(macOS) || os(Linux) || (os(iOS) && targetEnvironment(macCatalyst)))

20 | #error(

21 |     "_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly."

   |     `- error: _OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.
22 | )

23 | #endif

coming from here, which implies that you might need to cross-compile for Windows or do some other workaround, and that it's not possible to develop on the platform natively.

Thanks!

patricktcoakley avatar Apr 01 '25 15:04 patricktcoakley

There is a concern that the file locking approach that's being used to manage concurrent swiftly invocations might not be 100% reliable on Windows since the filesystem may not be able to entirely prevent races on file creation.

cmcgee1024 avatar Jul 10 '25 17:07 cmcgee1024