saschagrunert / webapp.rs

A web application completely written in Rust. 🌍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stdweb may not be used on the beta release channel

artem-v-shamsutdinov opened this issue · comments

Hi,

A complete rust + wasm newb here (coming from Typescript). I'm trying to build the frontend (on Ubuntu 18) and getting the following error:

$ make run-frontend

info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
Compiling proc-macro2 v0.4.19
Compiling unicode-xid v0.1.0
Compiling cc v1.0.25
Compiling ryu v0.2.6
Compiling serde v1.0.79
Compiling libc v0.2.43
Compiling pkg-config v0.3.14
Compiling failure_derive v0.1.2
Compiling rustc-demangle v0.1.9
Compiling cfg-if v0.1.5
Compiling itoa v0.4.3
Compiling matches v0.1.8
Compiling stdweb-internal-runtime v0.1.0
Compiling base-x v0.2.3
Compiling unicode-normalization v0.1.7
Compiling iovec v0.1.2
Compiling byteorder v1.2.6
Compiling discard v1.0.4
Compiling fnv v1.0.6
Compiling percent-encoding v1.0.1
Compiling anymap v0.12.1
Compiling slab v0.4.1
Compiling unicode-bidi v0.3.4
Compiling log v0.4.5
Compiling sass-sys v0.4.7
Compiling bytes v0.4.10
Compiling backtrace v0.3.9
Compiling http v0.1.13
Compiling backtrace-sys v0.1.24
Compiling quote v0.6.8
Compiling syn v0.14.9
Compiling syn v0.15.6
Compiling serde_json v1.0.31
Compiling serde_cbor v0.8.2
Compiling bincode v1.0.1
Compiling toml v0.4.7
Compiling serde_derive v1.0.79
Compiling idna v0.1.5
Compiling synstructure v0.9.0
Compiling url v1.7.1
Compiling stdweb-internal-macros v0.2.0
Compiling stdweb-derive v0.5.0
error[E0554]: #![feature] may not be used on the beta release channel
--> /home/artem/.cargo/registry/src/github.com-1ecc6299db9ec823/stdweb-internal-macros-0.2.0/src/lib.rs:1:1
|
1 | #![feature(proc_macro)]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try rustc --explain E0554.
error: Could not compile stdweb-internal-macros.
warning: build failed, waiting for other jobs to finish...
error: build failed
error: build failed
Makefile:95: recipe for target 'run-frontend' failed
make: *** [run-frontend] Error 101

$ rustc -V
rustc 1.30.0-beta.14 (1320d2145 2018-10-09)

I've installed the current beta version of Rust per instructions in RustWasm book:

https://rustwasm.github.io/book/game-of-life/setup.html

Should I be using the nightly version of Rust?

Thanks, :)

Hey, thank you very much for the request. It is correct that the default build target for the webapp.rs frontend needs rust nightly, this inherits from the --target=wasm32-unknown-unknown flag within the Makefile.

One option could be to switch to the asmjs target (--target=asmjs-unknown-emscripten) or use the nightly toolchain (rustup default nightly).

Feel free to close this ticket if there are no further questions from your side.

Understood, thank you!

I was able to run the app in dev mode, but could not deploy to some weird path issues on my box. Running "cargo web deploy --release" manually worked. I'm a bit surprised by the 720K size of the production .wasm file. Hope it will get smaller as libraries get better.

Thanks, :)