Server-Side Swift (Vapor) on Windows 11 inside WSL with Visual Studio Code
Install Ubuntu via the Microsoft store or WSL command line. This may require rebooting.
Open an ubuntu/bash terminal.
Check for any updates:
sudo apt-get update
sudo apt-get upgrade -y
Install prerequesites
sudo apt-get install -y binutils git gnupg2 libc6-dev libcurl4 libedit2 libgcc-9-dev libpython2.7 libsqlite3-0 libstdc++-9-dev libxml2 libz3-dev pkg-config tzdata uuid-dev zlib1g-dev make
Grab the latest swift 5.5 as of this writing
wget https://download.swift.org/swift-5.5-branch/ubuntu2004/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-12-07-a/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-12-07-a-ubuntu20.04.tar.gz
untar it
tar xzf swift-5.5-DEVELOPMENT-SNAPSHOT-2021-12-07-a-ubuntu20.04.tar.gz
set the swift path
export PATH=/home/YOURLINUXUSERNAME/swift-5.5-DEVELOPMENT-SNAPSHOT-2021-12-07-a-ubuntu20.04/usr/bin:"{$PATH}"
test that swift works
swift --version
install vapor toolbox
git clone https://github.com/vapor/toolbox.git
cd toolbox
git checkout 18.3.3
make install
check that vapor worked
vapor --help