Thanks for taking the time to look at this, @compnerd!
Ah, I should have specified: I'm aware of this limitation, and restarted the terminal and confirmed that my Path had correctly updated. In writing this up, I also restarted my machine just in case, and in re-confirming, honed in more directly on the issue I'm seeing: this appears to only be happening in WSL, and not from a regular command prompt.
(I happen to use WSL as my main driver for development, and I'm not usually thinking of the difference in environment.)
Command prompt:
$ where swiftCore.dll
C:\Program Files\swift\runtime-development\usr\bin\swiftCore.dll
$ where swift.exe
C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift.exe
$ swift.exe repl
Welcome to compnerd.org Swift version 5.8 (swift-5.8-RELEASE).
Type :help for assistance.
1> ^C
%Path%
C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe;C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\OpenVPN\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\itai\.cargo\bin;C:\Users\itai\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Sublime Text 3;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\itai\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\Users\itai\AppData\Roaming\npm;C:\Program Files\Java\jre1.8.0_211\bin;C:\Users\itai\AppData\Roaming\local\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\usbipd-win\;C:\Program Files (x86)\AOMEI;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Mullvad VPN\resources;C:\Program Files\AMD\AMDuProf\bin;C:\Program Files\swift\runtime-development\usr\bin;C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;C:\Program Files\LLVM\bin;C:\Users\itai\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\itai\AppData\Local\Programs\Python\Python310\;C:\Users\itai\.cargo\bin;C:\Users\itai\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Sublime Text 3;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\itai\AppData\Local\Microsoft\WindowsApps;C:\Program Files\MKVToolNix;C:\Users\itai\AppData\Local\Programs\espanso;C:\Users\itai\AppData\Roaming\cabal\bin;C:\tools\ghc-9.2.2\bin;C:\ghcup\bin;C:\Users\itai\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\itai\AppData\Roaming\npm;
In WSL:
$ which swiftCore.dll
/mnt/c/Program Files/swift/runtime-development/usr/bin/swiftCore.dll
$ which swift.exe
/mnt/c/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swift.exe
$ swift.exe repl

$PATH
/home/itai/.bin /home/itai/.local/bin /home/itai/.ghcup/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /usr/lib/wsl/lib /mnt/c/Program Files/WindowsApps/Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe /mnt/c/Program Files/Eclipse Adoptium/jdk-17.0.6.10-hotspot/bin /mnt/c/Program Files/Microsoft MPI/Bin/ /mnt/c/ProgramData/Oracle/Java/javapath /mnt/c/Windows/system32 /mnt/c/Windows /mnt/c/Windows/System32/Wbem /mnt/c/Windows/System32/WindowsPowerShell/v1.0/ /mnt/c/WINDOWS/system32 /mnt/c/WINDOWS /mnt/c/WINDOWS/System32/Wbem /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/ /mnt/c/Program Files/OpenVPN/bin /mnt/c/WINDOWS/System32/OpenSSH/ /mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR /mnt/c/Users/itai/.cargo/bin /mnt/c/Users/itai/AppData/Local/Microsoft/WindowsApps /mnt/c/Program Files/Sublime Text 3 /mnt/c/Program Files (x86)/Microsoft VS Code/bin /mnt/c/Users/itai/AppData/Local/Programs/Microsoft VS Code Insiders/bin /mnt/c/Users/itai/AppData/Roaming/npm /mnt/c/Program Files/Java/jre1.8.0_211/bin /mnt/c/Users/itai/AppData/Roaming/local/bin /mnt/c/WINDOWS/system32 /mnt/c/WINDOWS /mnt/c/WINDOWS/System32/Wbem /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/ /mnt/c/WINDOWS/System32/OpenSSH/ /mnt/c/Program Files/dotnet/ /mnt/c/Program Files (x86)/dotnet/ /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common /mnt/c/Program Files/usbipd-win/ /mnt/c/Program Files (x86)/AOMEI /mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/ /mnt/c/Program Files/Git/cmd /mnt/c/Program Files/nodejs/ /mnt/c/Program Files/Mullvad VPN/resources /mnt/c/Program Files/AMD/AMDuProf/bin /mnt/c/Program Files/swift/runtime-development/usr/bin /mnt/c/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin /mnt/c/Program Files/LLVM/bin /mnt/c/Users/itai/AppData/Local/Programs/Python/Python310/Scripts/ /mnt/c/Users/itai/AppData/Local/Programs/Python/Python310/ /mnt/c/Users/itai/.cargo/bin /mnt/c/Users/itai/AppData/Local/Microsoft/WindowsApps /mnt/c/Program Files/Sublime Text 3 /mnt/c/Program Files (x86)/Microsoft VS Code/bin /mnt/c/Users/itai/AppData/Local/Microsoft/WindowsApps /mnt/c/Program Files/MKVToolNix /mnt/c/Users/itai/AppData/Local/Programs/espanso /mnt/c/Users/itai/AppData/Roaming/cabal/bin /mnt/c/tools/ghc-9.2.2/bin /mnt/c/ghcup/bin /mnt/c/Users/itai/AppData/Local/Programs/Microsoft VS Code/bin /mnt/c/Users/itai/AppData/Roaming/npm /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl
I'm seeing exactly the same behavior for lldb.exe with python310.dll, so this is both not unique to swift.exe, and is also definitely related to WSL specifically.
So... I'd ask "is there a reason to expect this to not work under WSL?", but I suspect that WSL is a different-enough beast that it's not unexpected that things don't work the same, yeah? At least, it seems that DLL loading working differently when executing things through WSL is more of a Microsoft issue — unless you're aware of some possible misconfiguration on my end?
This is good to know, and I'll avoid going through the REPL, then!
FWIW, though this may be a different issue entirely, it appears that this may also extend to running a file directly with the swift front-end; compiling with swiftc does at least work:
$ swift test.swift
<unknown>:0: error: could not load the swift standard library
$ swiftc test.swift
Creating library test.lib and object test.exp
$ test.exe
Hello, world!
Will do, and thanks for the help! (If you think it's worth filing an issue for WSL specifically, happy to do that too!)