Swift dynamic loading API

I would use this to allow users to add new content to my games (modding). An example would be implementing support for an obscure game controller, or replacing the audio backend with a different backend. Or adding new levels and other in game content.

If plugins were modeled as a spm product they could potentially contain their own resources too.

A deployed executable could be expanded with functionality created by a different author. It would open Swift up to a whole new world of use cases.

If this by some miracle allowed safe unloading as well, I’d use it to reload recompiled parts of my games while they are running so I could see changes immediately. Which would be sooooo useful!

6 Likes