This projects shows that, in rust, the "same" object imported from two different versions of a same package is actually different.
mystr, both in version 1.0.0 and 1.1.0 simply exports an empty object.ais a package that importsbase1.0.0 and simply exports it.bis a package that importsbase1.1.0 and simply exports it.mainis the executable. It importsaandbtwo times each, then prints whether the two values imported froma(i.e.base1.0.0) are the same, whether the two values imported fromb(i.e.base1.1.0) are the same and whether the object imported fromais the same as the one imported fromb.
This is to show that:
- The object imported from
ais always the same: it'sbase1.0.0. - The object imported from
bis always the same: it'sbase1.1.0. - The object imported from
ais different from the one imported fromb, in spite of coming from a package with the same name.
To run this test, enter the main directory and run node index.js.