Closed Pzixel closed 6 years ago
Thanks for the report, @Pzixel !
First of all we should make sure that cargo build
(on Windows) obeys the rust-toolchain
file where the concrete version of rustc
is specified (https://github.com/paritytech/pwasm-tutorial/blob/master/step-0/rust-toolchain).
Have you tired
cargo build --release --target wasm32-unknown-unknown
?
I specifically removed rust-toolchain
from the directory because I must obey company rules that makes me to use the latest compiler only, so I had to do it.
Yes, I tried this command as well, it doesn't work. It also doesn't work on my linux machine. I suspect that there is some breaking change in the compiler that the old dependency doesn't build: wee_alloc
used by this create is 0.2.0 while its actual version is 0.4.0 and builds fine.
I've just checked, pwasm-std
doesn't compile with persisted rust-toolchain
file. I've just cloned the repo and ran cargo build
and get this error.
With wee-alloc
version setted to 0.4.0
it does compile, but it fails when building std
:
$ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling wee_alloc v0.4.0
Compiling void v1.0.2
Compiling parity-hash v1.1.0
Compiling unreachable v1.0.0
Compiling pwasm-alloc v0.3.0 (file:///C:/Users/Alex/Documents/Rust/pwasm-std/alloc)
Compiling pwasm-std v0.6.0 (file:///C:/Users/Alex/Documents/Rust/pwasm-std)
error[E0557]: feature has been removed
--> src\lib.rs:9:12
|
9 | #![feature(macro_reexport)]
| ^^^^^^^^^^^^^^
|
note: subsumed by `#![feature(use_extern_macros)]` and `pub use`
--> src\lib.rs:9:12
|
9 | #![feature(macro_reexport)]
| ^^^^^^^^^^^^^^
error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> src\lib.rs:29:3
|
29 | #[macro_reexport(vec, format)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to 2 previous errors
Some errors occurred: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.
error: Could not compile `pwasm-std`.
yeah, it's a known issue. It's not our top priority here, but it would be nice to migrate on the newest nightly and upgrade everything. We have to use rust-toolchain
with the concrete version, to have guaranties we use the same compiler because it's nightly.
Btw, if you would like to help, it would be a good contribution to the project, @Pzixel
So now pwasm-std
compiles with the nightly-2018-05-10
. Good job, @Pzixel!
I'd like to close this issue as soon we update pwasm-std
in the tutorial(s)
I'd like to close this issue as soon we update pwasm-std in the tutorial(s)
Looking forward to see it implemented. AFAIK we need to bump version here, then in pwasm-ethereum
, and only then it would be possible to update the tutorial.
pwasm-std & pwasm-ethereum updated and published
I'm building tutorial with
nightly-x86_64-pc-windows-gnu
(cargo 1.27.0-nightly (9e53ac6e6 2018-05-07)
).However, it doesn't compile.
My output: