Hi really hope someone can help. I had a freelancer from Fiverr carry out a project for me. The freelancer in question has now gone AWOL. I am trying to get support for someone to pick this up however another freelancer is advising that we need to know the nightly version used to continue the development. Can anyone advise how I can find this out? Appreciate any advice. Thank you
-
See if the project has a
rust-toolchain.toml
file. If it does not, one should be created once you have recovered the version information that should have been put in it in the first place. -
Nightly versions are identified by dates (e.g.
nightly-2024-11-08
). A good first try would be to find the dates on which the project was previously being developed (by consulting version control history), and try compiling it with those nightly versions. Provided you haverustup
installed, this is as simple as runningcargo +nightly-2024-11-08 check
. -
When the compiler tells you that a certain unstable feature doesn’t exist, consult the tracking issue for that feature, and figure out whether it predates or postdates the nightly version you're attempting, and take that information into account for your next version to try.
-
Once you have successfully compiled the project, review its usage of unstable features and remove all that are not actually necessary for your project goals. Heavy use of unstable features is only wise for Rust enthusiasts prepared to keep up with changes.
If you have any compiled binaries, there may be clues. With debuginfo, DWARF includes a DW_AT_producer
with the compiler version. There may also be an ELF comment section with that information, even without debuginfo. For example:
$ readelf -wi your-binary | grep DW_AT_producer
<c> DW_AT_producer : (indirect string, offset: 0xd70f2): clang LLVM (rustc version 1.84.0-nightly (b91a3a056 2024-11-07))
<d8> DW_AT_producer : (indirect string, offset: 0xd70f2): clang LLVM (rustc version 1.84.0-nightly (b91a3a056 2024-11-07))
<122> DW_AT_producer : (indirect string, offset: 0xd70f2): clang LLVM (rustc version 1.84.0-nightly (b91a3a056 2024-11-07))
[...]
$ readelf -p .comment your-binary
String dump of section '.comment':
[ 1] rustc version 1.84.0-nightly (b91a3a056 2024-11-07)
[ 35] Linker: LLD 19.1.3 (/checkout/src/llvm-project/llvm b35599be758613448201a49f4b8c7ebfba5558ac)
[ 93] GCC: (GNU) 14.2.1 20240912 (Red Hat 14.2.1-3)
Since nightlies capture the last build artifacts from the day before, this one would be nightly-2024-11-08
in rustup.
Hi, many thanks for your responses, I have the source code files, but no rust-toolchain file.
I have a compiled binary on my windows desktop.
I'm less familiar with Windows, so I don't know if it contains a similar producer string, but it will probably at least have some filename strings for panic locations in the standard library. If you can figure out a tool to dump strings from the binary, like the binutils strings
command on Linux, then you may find a path like "/rustc/b91a3a05609a46f73d23e0995ae7ebb4a4f429a5/library/" -- that hash is the same that I had in my nightly versions above. We can help figure out your nightly date from such a hash.