Swift compiler for Cygwin
tinysun212
released this
14 Oct 15:25
·
5 commits
to upstream-with-windows
since this release
What is this?
- Swift compiler for Cygwin 64bit
- Support Swift language 3.1
Newlib module
is included. It is a Glibc-like module for the Cygwin C runtime library.
Install
- Install Cygwin v2.9.0 64bit.
- In addition to the default Cygwin package, you should select some packages.
clang (4.0.1-1), libiconv-devel (1.14-3), libicu-devel (58.2-1) - Download and extract swift-cygwin-20171014-bin.tar.gz.
- Add the Swift toolchain to your path.
export PATH=$PATH:(your swift directory)/bin
How to run your Swift code
-
You can run in immediate mode.
ex)swift Hello.swift
-
You can compile and run.
ex)Compile swiftc Hello.swift Run Hello
-
You can try to run a Foundation application.
ex)Compile swiftc TestFoundation.swift Run TestFoundation
Notice
-
Foundation module
is included. -
Compiler Source: https://github.com/tinysun212/swift-windows/releases/tag/swift-cygwin-20171014
(based on: https://github.com/apple/swift/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2017-04-09-a) -
Foundation Source: https://github.com/tinysun212/swift-corelibs-foundation/releases/tag/swift-cygwin-20171014
(based on: https://github.com/apple/swift-corelibs-foundation/releases/tag/swift-DEVELOPMENT-SNAPSHOT-2017-04-09-a)