Google Expands Swift to Server-Side Development with New Cloud SDK
Google has introduced a new software development kit (SDK) that allows developers to access Google Cloud services using the programming language Swift. This move aims to expand Swift's use beyond Apple platforms and into server-side development.
The Google Cloud API Client Libraries for Swift, designed for Swift 6.2 and later, enable interactions with Cloud Storage, AI services, and Identity and Access Management (IAM), among other Google Cloud services. The SDK is optimized for servers, containers, and DevOps environments, supporting deployment on Cloud Run, Google Kubernetes Engine (GKE), or virtual machines within Compute Engine. It also compiles on macOS, allowing developers to build backends on Macs and run them on Linux.
Google highlights that recent advancements in Swift, particularly Swift 6, make the language suitable for system software and cloud environments. Swift 6 includes features that detect data races during compilation, ensuring software reliability. Combined with Swift NIO for non-blocking network traffic, the SDK supports frameworks like Hummingbird and Vapor for building microservices in Swift.
The SDK also aids platform engineering and DevOps, enabling developers to write command-line tools and scripts in Swift for use in CI/CD pipelines. However, Google cautions against embedding the SDK directly into iOS, iPadOS, or visionOS apps due to security risks, recommending Firebase or custom backends instead.
While Swift has been explored for server-side development since Apple open-sourced it in 2015, previous efforts by IBM and Amazon did not gain traction. Google's support for server-side Swift provides a renewed boost, though widespread adoption remains uncertain.