rustc 1.56.1
patatetom opened this issue · 2 comments
hi,
I want to compile zffacquire to try it.
I'm using a system with rustc 1.56.1 installed and it cannot be upgraded.
when I run the command cargo -v build --release
, I get errors like error: package 'abc Vx.y.z' cannot be build because it requires rustc 1.57...
.
I tried to modify the Cargo.toml
file without success.
if it is possible, how to compile zffacquire with this version 1.56.1 of rustc ?
regards, lacsaP.
Hi,
first you would need to make some changes to the underlying library (https://github.com/ph0llux/zff).
The zff-crate uses a too recent version of the time-crate (for 1.56), you have to downgrade that in the Cargo.toml first (but check first if there are security issues).
You have also downgrade the pkcs5 crate (0.4) and the scrypt crate (0.8).
second, some changes have to be made in the code itself. To check if a file is a symlink, I use std::fs::Metadata::is_symlink() - but this was first stabilized with 1.58.0. You'll have to look for an alternative for 1.56.1 (not sure, but I think you are unable to use unstable features / nightly rust at your system?).
Otherwise I use in the code at various format!() / write!() /... macros the possibility, to capture identifiers in the format strings (see https://blog.rust-lang.org/2022/01/13/Rust-1.58.0.html for additional information). It should be an easy step to change them.
There may be other points, but I haven't noticed any right now.
If you can find some good alternatives for the second point, feel free to open a pull request - if the code is valid, I'll merge it.
hi,
thank a lot for your help.
I changed my mind about what to do.
I could not simply update rustc with my package manager, so I decided to uninstall it and then install it directly from the rust-lang.org site and it worked.
I was able to compile zff* with the current version of rustc.
now I have to try zff*...
regards, lacsaP.