So I have a github codespace with a file called
main.swift, and I’m wondering, how do I run it?
swift main.swift but it gave
bash: swift: command not found.
You probably need to install swift though the shell
How do I install it?
In the future, I wouldn’t ask this on Replit Ask, but usually, you would run programs with their respective shell commands like you were doing. However, I don’t believe
swift is installed by default on Codespaces. I personally have no idea how you would actually install it, but maybe Swift.org - Getting Started has some information.