![]()
I’ve recently got interested in moving from writing Swift to dipping my toe in to contribute to the codebase.
However, I’m used to the ease of use of Xcode with the minimal tooling/lower level knowledge of being able to build and run code so found the initial setup and subsequent building process of the Swift project to be quite difficult - purely from my own lack of knowledge and experience in all of these areas.
One thing I hit was the expensive failure of waiting to build - potentially for a looonnnnnng time - before a possible failure, for example forgetting to pass a specific arg to the build command and only finding out after a 1hr+ build attempt
. This expensive failure became quite frustrating to begin with and I’m assuming I’m not alone with wanting to contribute code-wise but needing a more simplified experience for modifying and creating Swift Toolchains.
So I turned to a cli tool to help me automate the setup, build, and installation of a local Swift toolchain.
The build command (screenshots below) is as easy as selecting from a couple of options in order to keep builds minimal but (hopefully) predictable and ‘never’ fail (at least not because of bad command args). You can pass a ‘?’ in order to see more info and even get a preview of the final full swift-build command before running it for peace of mind (and to maybe learn a little more as you start out).
It also adds a doctor command to help you make sure your environment is all set up for development with the various dependencies, checking and even installing anything you may need like sccache. You can also clone the project in to a new swift-project directory if you need it.
You can even speed run the wizard with sensible defaults by simply hitting enter to use sensible defaults to build the minimal toolchain!
Once a build succeeds - you can hit enter to install the toolchain directly to Xcode to use.
I’m sure this tool doesn’t do everything and is certainly intended for others who are starting out to lower the barrier to entry to get something built.
It would be great in this alpha version of the tool if I could get any input from anyone, new, experienced or seasoned veteran of the Swift project to see if it has any benefit for them - or any issues which may be lurking and need fixing (I’m sure there are!)
Similarly, any suggestions on improvements or alternative workflows.
The current version is not perfect for sure and I’d prefer to get some eyes on the using of it sooner than later in order to fix things to ensure it doesn’t ‘just work on my machine’.
Any feedback, questions or comments are welcome and appreciated!
…
…
Try it out here:



