warner / wireguard-vanity-address

generate Wireguard keypairs with a given prefix string
MIT License
437 stars 32 forks source link

Failed at install time with 'editions are unstable' #17

Closed stratosgear closed 4 years ago

stratosgear commented 4 years ago

I get a:

 cargo install wireguard-vanity-address
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading wireguard-vanity-address v0.4.0                                    
error: failed to parse manifest at `/home/stratos/.cargo/registry/src/github.com-1ecc6299db9ec823/wireguard-vanity-address-0.4.0/Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition"]` to enable this feature

Not being very familiar with Rust, and failing to find a google solution, how would I proceed fixing this?

Thanks!

warner commented 4 years ago

hm, what version of rust/cargo are you running? (cargo --version). I'm guessing it's fairly old, and doesn't understand the "edition" keyword (which was added in 1.31, released in december 2018).

I'm not exactly sure what our "MSRP" (Minimum Supported Rust Version) is. We're running CI against rust-1.41, and the current release is rust-1.42, so it at least works on those. I just ran tests locally against rust-1.37 and that seemed to work too. From what I've seen, a lot of people are always using the most recent stable release of rust (there's a new one every six weeks), so it takes a bit of deliberate effort to establish and maintain an MSRP, and it's easy to get kind of careless and accidentally require newer features.

I'm using rustup to keep my rust up-to-date, and I think rustup is also the recommended way to install rust in the first place. If you're using rustup then maybe you just need to ask it to upgrade your installation: rustup update. If not, maybe the easiest path is to install it.. the instructions are at https://www.rust-lang.org/learn/get-started .

Let me know how it goes!

stratosgear commented 4 years ago

I had rust/cargo installed with pacman (in arch) and I though that it will be always kept updated to latest version (I regularly update with pacman).

Nonetheless, running rustup update seems to have updated to something more recent and now I can install fine.

Thanks...

warner commented 4 years ago

great!