You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to build an app that uses Foundation Models to dynamically generate output for a defined struct (using @generable and @Guide), however I get:
error: external macro implementation type 'FoundationModelsMacros.GenerableMacro' could not be found for macro 'Generable(description:)'; plugin for module 'FoundationModelsMacros' not found
Could support for FoundationModelsMacros be realistically added to this project or is it something totally proprietary that Apple would never let us use?
This is an excellent tool by the way, it has been incredibly helpful and convenient, thank you Kabir.
thanks! this is definitely feasible. I started putting together an open source reimplementation of proprietary Apple macros a while ago (#101) but haven't merged that PR because I haven't yet figured out how to deal with 1) versioning macros alongside Apple SDK updates and 2) a way to serve macro updates without needing to update the SDK. it's just something that I need to think about a bit more; haven't had the chance yet.
the bigger blocker is re-implementing FoundationModelsMacros. but this is also probably quite feasible now: one could set up an agentic loop where it compares its own implementation to swiftc file.swift -Xfrontend -dump-macro-expansions. the main requirements are time and some liberal token spend. it's not a p0 for me atm so if you / anyone else wants to give it a stab I'd welcome PRs to xtool-org/OpenAppleMacros!
Activity
kabiroberai commentedon May 28, 2026
thanks! this is definitely feasible. I started putting together an open source reimplementation of proprietary Apple macros a while ago (#101) but haven't merged that PR because I haven't yet figured out how to deal with 1) versioning macros alongside Apple SDK updates and 2) a way to serve macro updates without needing to update the SDK. it's just something that I need to think about a bit more; haven't had the chance yet.
the bigger blocker is re-implementing
FoundationModelsMacros. but this is also probably quite feasible now: one could set up an agentic loop where it compares its own implementation toswiftc file.swift -Xfrontend -dump-macro-expansions. the main requirements are time and some liberal token spend. it's not a p0 for me atm so if you / anyone else wants to give it a stab I'd welcome PRs to xtool-org/OpenAppleMacros!kabiroberai commentedon Sep 21, 2026
xtool v1.20.0 now integrates OpenAppleMacros for SwiftUI. Probably possible to add FoundationModels support with one prompt.
kabiroberai commentedon Sep 21, 2026
This will be fixed by #270
sdk: update darwin-tools and OAM (xtool-org#270)