No hash nor version when generating rlib

130 Views Asked by At

In both official docs and on rustbyexample.com it is stated that when compiling a library (--crate-type=lib) the generated library file will have a hash in their filename, like libworld-<HASH>-0.42.rlib.

But when trying on my box it doesn't generate any hash (nor version) on filename, it´s just "lib" + library name + ".rlib" (like libworld.rlib).

Is this officially changed?

By the way, I'm using version 0.12.0-pre-nightly with Ubuntu 14.04.

1

There are 1 best solutions below

0
talles On BEST ANSWER

I have also asked this question on rust's subreddit and steveklabnik kindly answered.

It appears so that yes, this have been changed:

Under this new scheme, the new output filenames by the compiler would be:

lib<name>.rlib

Note that both the <version> and the <hash> are missing by default. The <version> was removed because the compiler no longer knows about the version, and the <hash> was removed to make the output filename predictable.

This change seems to be due the depreciation of rustpkg in favor of cargo.