As you know, Microsoft built new infrastructure within Windows – the Windows Subsystem for Linux (WSL) – upon which we run a genuine Ubuntu user-mode image provided by Microsoft great partners over at Canonical, creators of Ubuntu Linux. The result is that you can now run native Bash on Ubuntu on Windows.

If you don't have a enable Ubuntu on Windows check out step-vise Guide to Enable Windows 10’s Ubuntu Bash Shell (Windows Subsystem for Linux).

Here the step-vise guide to Install Swift 3.0 on Windows 10 -

1. Open bash and move to root:

  • To open bash open Run (Windows Key + R) then type bash and hit enter.

  • Move to Root: Type cd and hit enter

    cd
    

2. Install required dependencies:

apt-get install clang libicu-dev  

3. Download the latest swift binary release

  • Download the latest version of Swift binary for Ubuntu 14.04 from here
  • Create a folder with name Swift in C drive
  • Copy downloaded swift binary in this folder
  • Type this command to change directory

    cd /mnt/c/Swift
    

4. Install Swift

tar -zxvf swift-3.0.1-RELEASE-ubuntu14.04.tar.gz  

5. Change directory to swift compiler bin

cd swift-3.0.1-RELEASE-ubuntu14.04/usr/bin  

6. Write your first program

7. Compile and Runt

To Compile your program type

./swiftc helloworld.swift

To Run your program type

./helloworld