Skip to content

Conversation

@stevenbrix
Copy link
Contributor

@stevenbrix stevenbrix commented Nov 2, 2025

TL;DR

Added back project file generation capabilities to swiftwinrt and improved VS Code debugging support.

I deleted project file generation with #217, but it's actually useful. Plus, with future changes to how modules are going to be generated, it's convenient to have the tool do it. As developers will likely need to configure their build environment, having this capability will give them a one-line command to get started.

What changed?

  • Added VS Code launch configurations for debugging swiftwinrt and project file generation
  • Updated VS Code tasks to make "Build swiftwinrt" the default build task
  • Implemented project file generation for Swift Package Manager (SPM) and CMake
  • Added a new -task parameter to swiftwinrt with options:
    • GenerateBindings (default): Generates Swift code bindings
    • GenerateProjectFiles: Generates project files for SPM/CMake
  • Added -swift-version parameter for SPM project generation
  • Refactored code generation into separate task modules
  • Added test project files for the test component

How to test?

  1. Use the new VS Code launch configurations to debug swiftwinrt
  2. Generate project files with:
    swiftwinrt -task GenerateProjectFiles -spm -swift-version 5.7 [other parameters]
    
  3. Build the test component with the new CMake target:
    cmake --build . --target GenerateProjectFiles
    

Why make this change?

This change improves the developer experience by:

  1. Making it easier to debug swiftwinrt in VS Code
  2. Automating the generation of project files for Swift Package Manager and CMake
  3. Separating code generation from project file generation for better organization
  4. Enabling better integration with Swift build systems

Copy link
Contributor Author

stevenbrix commented Nov 2, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@stevenbrix stevenbrix marked this pull request as ready for review November 2, 2025 04:15
@stevenbrix stevenbrix mentioned this pull request Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants