Skip to content

Swift compiler for Cygwin

Pre-release
Pre-release
Compare
Choose a tag to compare
@tinysun212 tinysun212 released this 12 Sep 22:44
· 0 commits to stable since this release

System Requirement

  • This archive is an EXPERIMENTAL build on Cygwin 64bit.
  • To compiling Swift source, you should install Cygwin 2.5.2 64bit.
  • Addition to the default Cygwin packages, you should select some packages.
    1. Devel folder: clang (3.7.1-1) - C/C++ compiler frontend based on LLVM
    2. Libs folder: libiconv-devel (1.14-3) - Unicode iconv() implementation
    3. Libs folder: libicu-devel (57.1-1) - IBM Internationalization Components for Unicode

Install

Download and extract swift-cygwin-20160913-bin.tar.gz.
Add the Swift toolchain to your path.
export PATH=$PATH:(your swift directory)/bin

Run

You can try to run the Package Manger.
(swift test does not work due to some bugs.)
ex)

  $ mkdir Hello
  $ cd Hello
  $ swift package init --type executable
  $ swift build
  $ .build/debug/Hello

You can run in immediate mode.
ex) swift Hello.swift

You can compile and run with dynamic library
ex)

  Compile
    swiftc Hello.swift

  Run
    Hello

You can try to run a Foundation application
ex)

  Compile
    swiftc TestFoundation.swift -I /usr/include

  Run
    TestFoundation

Notice

Compiler Source: https://github.com/tinysun212/swift-windows/releases/tag/swift-cygwin-20160913
(based on: https://github.com/apple/swift/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a)

Fondation Source: https://github.com/tinysun212/swift-corelibs-foundation/releases/tag/swift-cygwin-20160913
(based on: https://github.com/apple/swift-corelibs-foundation/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a)

Package Manger Source: https://github.com/tinysun212/swift-package-manager/releases/tag/swift-cygwin-20160913
(based on: https://github.com/apple/swift-package-manager/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a)

llbuild Source: https://github.com/tinysun212/swift-llbuild/releases/tag/swift-cygwin-20160913
(based on: https://github.com/apple/swift-llbuild/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a)