[GSoC 2025] Bringing Swiftly support to VS Code

Hi Swift community! :waving_hand:

I am Priyambada Roul. I'm incredibly excited to share what I've been working on over the past three months as part of Google Summer of Code 2025 with Swift.org, alongside my mentors, @cmcgee1024 @matthewbastien

My project focused on integrating Swiftly (Swift's toolchain manager) into the VS Code Swift extension.

The Problem We Solved

We've made switching toolchains easier with Swiftly, allowing you to install and switch between Swift versions without leaving VS Code.

  1. Switch Swift versions with a single click

  2. Install new toolchains without leaving VS Code

  3. See real-time progress during installations

  4. Automatically sync with project-specific Swift versions

What's New for Swift Developers

Swiftly VS Code Integration

The VS Code extension now provides an entirely seamless toolchain management experience:

  • We now support macOS too!

  • See your current Swift version in the VS Code status bar.

  • Click the version to switch between installed toolchains instantly.

  • Install any Swift version directly from VS Code with real-time progress.

  • Automatic detection of .swift-version files with prompts to switch

Enhanced Swiftly CLI

  • Swiftly now supports a machine-readable JSON output format.

  • Swiftly now reports toolchain installation progress updates in JSONL format

  • We have polished error reporting.

Things I learnt:

  • Making a VS Code extension. While I have experience with TypeScript from web development, the VS Code extension API and its development workflow are different from what I'm used to.

  • I understood the structure and distribution of Swift toolchains, as well as how different versions can coexist on the same system using symlinks, environment variables, and PATH manipulation, across both macOS and Linux.

  • The extension spawns Swiftly processes and reads their JSON output streams in real-time. This involved learning about IPC mechanisms, stdin/stdout buffering and process lifecycle management.

Future Work

While the core Swiftly integration is complete, we have several enhancements planned:

  • One-click, swiftly set up for new users.

  • More robust handling of edge cases

  • UI polishing

  • Windows support

I couldn't wrap this up without giving huge thanks to my incredible GSoC mentors,@cmcgee1024 and @matthewbastien - you both were absolutely amazing throughout this journey! Your patience with my endless questions (especially the fundamental ones at the start), your thoughtful code reviews, and your guidance on architectural decisions made all the difference. I also want to thank @award999 for your guidance through the PR suggestions.

Explore the Code

Want to see what we built? Check out the repositories:

I have linked all pull requests and technical details in my detailed project report, which provides an in-depth look into the specific changes.

This GSoC experience has been transformative. I came in as someone intimidated by large codebases, and I'm leaving with the confidence to tackle complex, multi-tool integrations. I'm excited to continue contributing to Swift community!

Thank you.

27 Likes

Awesome work, Priyambada! This is really fantastic and will have a long lasting positive impact on a lot of developers be it trying Swift for the first time or using it daily and switching Swift versions a lot!

Thanks a lot and I’m really happy you had a nice experience! We’re going to collect all the GSoC summary posts into a blog post on swift.org as well, but we’ll wait until the last project has finished up as well (it’s going a month longer). Thanks again and I hope to see you around in various Swift repos and community! :slight_smile:

2 Likes

This is great Priyambada, I’ve been needing to jump toolchains far more often lately, and the swiftly & VS Code integration there is going to be perfect for what I’m after,

thank you!

2 Likes