solokeys / solo2-cli

Solo 2 library and CLI in Rust
https://docs.rs/solo2
Apache License 2.0
173 stars 31 forks source link

cargo install fails to build #43

Closed kusma closed 2 years ago

kusma commented 2 years ago

Trying to issue cargo install as suggested by the README on Debian Sid results in the following errors:

error[E0658]: panicking in constant functions is unstable
   --> /home/kusma/.cargo/registry/src/github.com-1ecc6299db9ec823/solo2-0.1.1/src/transport/ctap.rs:114:9
    |
114 |         assert!(vendor_code >= 0x40);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #51999 <https://github.com/rust-lang/rust/issues/51999> for more information
    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: panicking in constant functions is unstable
   --> /home/kusma/.cargo/registry/src/github.com-1ecc6299db9ec823/solo2-0.1.1/src/transport/ctap.rs:115:9
    |
115 |         assert!(vendor_code <= 0x7F);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #51999 <https://github.com/rust-lang/rust/issues/51999> for more information
    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0658`.
error: could not compile `solo2` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `solo2 v0.1.1`, intermediate artifacts can be found at `/tmp/cargo-install7vAcTe`

Caused by:
  build failed

I'm no rust-expert, but it seems like a too new language feature was used.

nickray commented 2 years ago

Update your Rust (rustup update) - don't use distro Rust/cargo. Our MSRV is latest stable.

kusma commented 2 years ago

Maybe worth mentioning in the readme?