[rust-dev] Deprecating rustpkg

Jack Moffitt jack at metajack.im
Fri Jan 31 14:29:09 PST 2014


> I am still confused about:
>
> 1) In what situations are you saying there would actually be a workable
> multi-version solution that wouldn't exist in a system like Maven
> 2) How these solutions are calculated

Every symbol in a crate is hashed with its version. You can load two
extern mod's of the same libriary with different versions with no
problems. Even within the same crate. To the extent that the two
different versions aren't creating a socket to talk to each other with
different versions of a protocol, this works fine. As an example,
think about a JSON library that has undergone significant API changes.
Each version can still read and write JSON, but the API to use them
might be quite different. There's no inherent conflict to using both
versions.

As for how you would calculate this, it's easy. You just use exactly
the versions that the extern mods ask for. If they ask for a version,
you pick that one. If they don't, you pick the newest one. This breaks
the same way as any other algorithm when the unconstrained
dependencies can't be resolved.

This is substantially different than the Java (or Erlang) world where
the function names are not versioned behind the scenes and would
clobber each other.

Hopefully I haven't misunderstood your question.

jack.


More information about the Rust-dev mailing list