Discover implementations at runtime


As it stands right now, Cargo DefaultXXXFactory only knows about implementations that are hard-coded in them. This makes it unnecessarily hard for people (like me) to develop container implementations. I can't provide the same level of usability to users unless I get into the core.

But this needs not be the case. We should use the standard META-INF/services look up to discover implementations at runtime.

In this way, there's an easier path for additional container implementations — they can start on their own outside Cargo, be proven usable, and then gradually get into the Cargo project itself if that makes sense. If for whatever reasons it needs to stay outside the main Cargo project, that can work, too.

I'm willing to provide a patch for this change if the developers are OK with the direction.


Kohsuke Kawaguchi


Kohsuke Kawaguchi


Fix versions

Affects versions