jedisct1 / rust-ed25519-compact

Small, wasm-friendly, zero-dependencies Ed25519 and X25519 implementation for Rust.
MIT License
121 stars 22 forks source link

Build failing #3

Closed samip5 closed 4 years ago

samip5 commented 4 years ago

I don't know what's the actual issue, but my build of tor-v3-vanity fails due to an issue in this, I think.

$ cargo install --path .
  Installing tor-v3-vanity v0.1.0 (/home/sm/tor-v3-vanity)
    Updating crates.io index
   Compiling ed25519-compact v0.1.8
   Compiling libc v0.2.79
   Compiling miniz_oxide v0.4.3
   Compiling num-traits v0.2.12
   Compiling num-integer v0.1.43
   Compiling crossbeam-utils v0.7.2
   Compiling proc-macro2 v1.0.24
   Compiling syn v1.0.46
   Compiling generic-array v0.14.4
   Compiling typenum v1.12.0
   Compiling getrandom v0.1.15
   Compiling memchr v2.3.3
   Compiling failure_derive v0.1.8
   Compiling serde v1.0.117
   Compiling addr2line v0.13.0
   Compiling regex v0.2.11
   Compiling byteorder v1.3.4
   Compiling regex-syntax v0.5.6
   Compiling semver v0.9.0
   Compiling bitflags v1.2.1
   Compiling maybe-uninit v2.0.0
   Compiling cuda-sys v0.2.0
   Compiling textwrap v0.11.0
   Compiling ed25519 v1.0.3
error[E0432]: unresolved import `std`
 --> /home/sm/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-compact-0.1.8/src/ed25519.rs:5:5
  |
5 | use std::fmt;
  |     ^^^ use of undeclared type or module `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `ed25519-compact`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tor-v3-vanity v0.1.0 (/home/sm/tor-v3-vanity)`, intermediate artifacts can be found at `/home/sm/tor-v3-vanity/target`

Caused by:
  build failed

Related: https://github.com/dr-bonez/tor-v3-vanity/issues/4

jedisct1 commented 4 years ago

If std cannot be found, there is definitely something broken with your Rust installation.

There's not much that can be done on my end :)

jedisct1 commented 4 years ago

Try cargo update before compiling :)

dr-bonez commented 4 years ago

this error is happening because the crate is built in no_std mode. looks like you found and fixed the issue though.