How do you implement a plugin system with snaps?

Looking an porting some projects to Snapcraft, and one thing I’m having trouble figuring out is how one could expose a plugin to a consumer without using non-snap features or classic confinement.

The consumer does not know what plugins exist, the user could install any number of plugins from any source they want. Is there a way to use the content interface that allows multiple producers to one plug?

You need to define a content interface for this sharing these plugins, but it is possible to connect multiple slots to a plug: “When multiple slots are connected to the same plug…”

https://snapcraft.io/docs/content-interface

You can indeed always just have users install plugins into the snap environment as needed (in one of the writable $SNAP_* directores that you can then re-map via layouts to locations where your app expects them), but if you consider having your plugins provided as snaps as well, then what alan said above is correct, you can use the content interface …

Ah! That’s… much simpler than I thought! For some reason I didn’t see that on the page, and Google apparently missed it too! Thanks!