rustyscreeps / screeps-starter-rust

Starter Rust AI for Screeps, the JavaScript-based MMO game
MIT License
121 stars 47 forks source link

Failed to compile stdweb-derive #4

Closed wischi-chr closed 5 years ago

wischi-chr commented 5 years ago

I tried to clone the project and build at (according to readme) but it fails to compile - I'm also pretty new to rust so I've not really a clue how to fix that.

   [...]
   Compiling enum_primitive v0.1.1
   Compiling quote v0.6.8
   Compiling syn v0.15.14
   Compiling serde_json v1.0.32
   Compiling serde_derive v1.0.80
   Compiling stdweb-derive v0.5.1
error[E0554]: #![feature] may not be used on the stable release channel
   --> C:\Users\Wischi\.cargo\registry\src\github.com-1ecc6299db9ec823\stdweb-0.4.10\src\lib.rs:115:5
    |
115 | /     feature(use_extern_macros)
116 | | )]
    | |_^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0554`.
error: Could not compile `stdweb`.

To learn more, run the command again with --verbose.
error: build failed
error: 'cargo web' exited with a non-zero exit code: exit code: 101

Did I miss something? Thanks and advance

ASalvail commented 5 years ago

Hi @wischi-chr

As it says here

error[E0554]: #![feature] may not be used on the stable release channel

the API uses features from rust that are not yet considered stable. Try using the nightly build toolchain. You can follow instructions here: https://doc.rust-lang.org/stable/book/2018-edition/appendix-06-nightly-rust.html#rustup-and-the-role-of-rust-nightly

wischi-chr commented 5 years ago

Hi @ASalvail

Switched to rustc nightly now it works. Thank you for your help.