Swift 6.4 Unifies Building Across Linux, MacOS, Windows
Arthur T Knackerbracket writes:
Although Swift serves as Apple's primary language for macOS and iOS application development, the open-source community continues to expand its reach-driving its adoption as a multi-platform language or even a cross-platform one in fields beyond user interface design.
Tuesday's Swift 6.4 release continued that work. Along with the usual assortment of type shortcuts and async adjustments came word that Swift Build is now the default build engine for the Swift Package Manager.
Synergies have already ensued! The pairing sets the stage for a faster build process. A developer can write a program in Swift and Swift Build will automatically download and install the required dependencies, testing them for compatibility. It then compiles the code into a CPU-specific binary.
The merger also unifies the Swift developer experience regardless of platform.
With this integration, a developer can run through the entire build process in their own environment, be it Apple's Xcode IDE or a beloved command line, and all the steps will be exactly the same for a Linux, macOS, or Windows app.
Or the developer can run their builds from VS Code, thanks to a new extension available on the Open VSX Registry.
Sweetening the deal, the integrated package comes with a tool to generate an SBOM (Software Bill of Materials) for each app, listing all the dependencies in either the SPDX or CycloneDX format (SE-0509). SBOMs are da bomb when it comes to software auditing and checking for potential security bugs.
In a way, Swift is following the lead of Rust's Cargo and Go's command line, both of which run as unified toolchains, as does Bun for JavaScript. A single integrated workflow can take the place of manually calling one tool after another to schlep some code into production.
Read more of this story at SoylentNews.