Stream: git-wasmtime

Topic: wasmtime / Issue #1758 rust-crypto breaks cargo build --t...


view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:23):

MikeCamel opened Issue #1758:

Following instructions from here:https://github.com/bytecodealliance/wasmtime/blob/master/docs/WASI-tutorial.md

[dependencies]
rust-crypto = "0.2.36"
[mbursell@redz1 test-n-try]$ cargo build --target wasm32-wasi --verbose
       Fresh gcc v0.3.55
       Fresh rand v0.4.6
   Compiling rustc-serialize v0.3.24
     Running `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow`
   Compiling rust-crypto v0.2.36
       Fresh libc v0.2.71
       Fresh rand v0.3.23
       Fresh time v0.1.43
     Running `rustc --crate-name build_script_build /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-crypto-0.2.36/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7f2ee95fb96eec39 -C extra-filename=-7f2ee95fb96eec39 --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39 -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --extern gcc=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps/libgcc-4bc2c35f0d7340fa.rlib --cap-lints allow`
     Running `/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39/build-script-build`
error[E0046]: not all trait items implemented, missing: `encode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1
     |
853  |     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>;
     |     ---------------------------------------------------------------- `encode` from trait
...
1358 | impl Encodable for path::Path {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `encode` in implementation

error[E0046]: not all trait items implemented, missing: `decode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1382:1
     |
904  |     fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
     |     ----------------------------------------------------------- `decode` from trait
...
1382 | impl Decodable for path::PathBuf {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `decode` in implementation

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0046`.
error: could not compile `rustc-serialize`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow` (exit code: 1)
[mbursell@redz1 test-n-try]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mbursell/.rustup

installed targets for active toolchain
--------------------------------------

wasm32-wasi
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:23):

MikeCamel labeled Issue #1758:

Following instructions from here:https://github.com/bytecodealliance/wasmtime/blob/master/docs/WASI-tutorial.md

[dependencies]
rust-crypto = "0.2.36"
[mbursell@redz1 test-n-try]$ cargo build --target wasm32-wasi --verbose
       Fresh gcc v0.3.55
       Fresh rand v0.4.6
   Compiling rustc-serialize v0.3.24
     Running `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow`
   Compiling rust-crypto v0.2.36
       Fresh libc v0.2.71
       Fresh rand v0.3.23
       Fresh time v0.1.43
     Running `rustc --crate-name build_script_build /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-crypto-0.2.36/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7f2ee95fb96eec39 -C extra-filename=-7f2ee95fb96eec39 --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39 -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --extern gcc=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps/libgcc-4bc2c35f0d7340fa.rlib --cap-lints allow`
     Running `/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39/build-script-build`
error[E0046]: not all trait items implemented, missing: `encode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1
     |
853  |     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>;
     |     ---------------------------------------------------------------- `encode` from trait
...
1358 | impl Encodable for path::Path {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `encode` in implementation

error[E0046]: not all trait items implemented, missing: `decode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1382:1
     |
904  |     fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
     |     ----------------------------------------------------------- `decode` from trait
...
1382 | impl Decodable for path::PathBuf {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `decode` in implementation

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0046`.
error: could not compile `rustc-serialize`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow` (exit code: 1)
[mbursell@redz1 test-n-try]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mbursell/.rustup

installed targets for active toolchain
--------------------------------------

wasm32-wasi
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:31):

bjorn3 commented on Issue #1758:

rust-crypto seems to not support wasm: https://github.com/DaGenix/rust-crypto/issues/437#issuecomment-395915033. The author of that comment has forked it to add wasm support: https://github.com/buttercup/rust-crypto-wasm.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:32):

bjorn3 edited a comment on Issue #1758:

rust-crypto seems to not support wasm: https://github.com/DaGenix/rust-crypto/issues/437#issuecomment-395915033. The author of that comment has forked it to add wasm support: https://github.com/buttercup/rust-crypto-wasm. Also the last update of rust-crypto was in 2016. The last update of the fork was in 2018. Consider using a different crypto library.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:44):

MikeCamel commented on Issue #1758:

I've updated to rust-crypto-wasm v.0.3.1, and all compiles! Thank you.

-Mike.

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:44):

MikeCamel closed Issue #1758:

Following instructions from here:https://github.com/bytecodealliance/wasmtime/blob/master/docs/WASI-tutorial.md

[dependencies]
rust-crypto = "0.2.36"
[mbursell@redz1 test-n-try]$ cargo build --target wasm32-wasi --verbose
       Fresh gcc v0.3.55
       Fresh rand v0.4.6
   Compiling rustc-serialize v0.3.24
     Running `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow`
   Compiling rust-crypto v0.2.36
       Fresh libc v0.2.71
       Fresh rand v0.3.23
       Fresh time v0.1.43
     Running `rustc --crate-name build_script_build /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-crypto-0.2.36/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7f2ee95fb96eec39 -C extra-filename=-7f2ee95fb96eec39 --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39 -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --extern gcc=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps/libgcc-4bc2c35f0d7340fa.rlib --cap-lints allow`
     Running `/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/build/rust-crypto-7f2ee95fb96eec39/build-script-build`
error[E0046]: not all trait items implemented, missing: `encode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1358:1
     |
853  |     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>;
     |     ---------------------------------------------------------------- `encode` from trait
...
1358 | impl Encodable for path::Path {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `encode` in implementation

error[E0046]: not all trait items implemented, missing: `decode`
    --> /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/serialize.rs:1382:1
     |
904  |     fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
     |     ----------------------------------------------------------- `decode` from trait
...
1382 | impl Decodable for path::PathBuf {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `decode` in implementation

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0046`.
error: could not compile `rustc-serialize`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rustc_serialize /home/mbursell/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.24/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=81dd7fcdc8fa060f -C extra-filename=-81dd7fcdc8fa060f --out-dir /home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps --target wasm32-wasi -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/wasm32-wasi/debug/deps -L dependency=/home/mbursell/work/programming/rust/projects/test-n-try/target/debug/deps --cap-lints allow` (exit code: 1)
[mbursell@redz1 test-n-try]$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mbursell/.rustup

installed targets for active toolchain
--------------------------------------

wasm32-wasi
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.43.1 (8d69840ab 2020-05-04)

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 16:54):

sunfishcode commented on Issue #1758:

It should be noted that rust-crypto-wasm uses compiled implementations of secure_memset and fixed_time_eq which when compiled to wasm are not guaranteed to uphold the "secure" or "fixed_time" parts of their respective names.


Last updated: Nov 22 2024 at 16:03 UTC