Announcing SwiftSyntaxBuilder

Hi Swift Community!

SwiftSyntaxBuilder a new library that makes it possible to generate Swift code in a declarative way using result builders. :tada:

The library contains everything to get started generating Swift code with a nice and convenient API, but there is space for improvements!

I would like to encourage everyone interested to give SwiftSyntaxBuilder a try, report any feedback you have or contribute to the library. Any contributions would be amazing and this is a community driven library so if you want to get involved, please do! :pray:

Based on your feedback, we will be working on finding the missing parts and implementing them.

If you find a bug or have a suggestion to improve the API, you can find the guide to report them here.

Thanks to Akio Yasui for the initial version.

Thanks!

Kim

21 Likes

I think I found an example of this new library here: swift-syntax/CodeGenerationUsingSwiftSyntaxBuilder.swift at main ยท apple/swift-syntax ยท GitHub

Looks pretty neat!

3 Likes

Congratulations on the initial take on the lib! This is awesome and really a lifesaver for source generation plugins :clap: I've been cheering on this effort from the sidelines ever since :smiley:

For better or worse, for my current work we moved away from source generation but the shape of the lib and APIs looks excellent, exactly what one would have hoped for - congrats and thanks for your work!

5 Likes