Yew: Compatibility

Created on 24 Dec 2017  Â·  5Comments  Â·  Source: yewstack/yew

It seems that this only builds on asmjs-unkown-emscripten in debug mode

Most helpful comment

The wasm32-unknown-unknown builds work (FYI, those are all release builds as rustc itself isn't able to properly do a debug build for that target yet), as do all of the debug *-emscripten ones. The Emscripten release builds check the generated .js file's syntax, which is why they fail.

You need to change this:

let callback = @{callback};

into this:

var callback = @{callback};

in html.rs#48

All 5 comments

Thank you for this issue report. Right, It doesn't work for every target, but only for asmjs debug. While there are cases when even asmjs fails, like this one: https://github.com/rust-lang/rust/issues/46730
I'm going to do it compatible with all targets. With your permission I will use this issue for tracking support of:

  • [x] asmjs-unkown-emscripten - debug
  • [ ] asmjs-unkown-emscripten - release
  • [ ] wasm32-unknown-emscripten - debug
  • [ ] wasm32-unknown-emscripten - release
  • [ ] wasm32-unknown-unknown - debug
  • [ ] wasm32-unknown-unknown - release
  • [ ] add checks to TravisCI

Related: https://github.com/koute/stdweb/issues/36

Go for it.

On Mon, Dec 25, 2017, 2:42 AM Denis Kolodin notifications@github.com
wrote:

Thank you for this issue report. Right, It doesn't work for every target,
but only for asmjs debug. While there are cases when even asmjs fails,
like this one: rust-lang/rust#46730
https://github.com/rust-lang/rust/issues/46730
I'm going to do it compatible with all targets. With your permission I
will use this issue for tracking support of:

  • asmjs-unkown-emscripten - debug
  • asmjs-unkown-emscripten - release
  • wasm32-unknown-emscripten - debug
  • wasm32-unknown-emscripten - release
  • wasm32-unknown-unknown - debug
  • wasm32-unknown-unknown - release
  • add checks to TravisCI

Related: koute/stdweb#36 https://github.com/koute/stdweb/issues/36

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/DenisKolodin/yew/issues/6#issuecomment-353843207, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFwTPseqmyEQli7Jvbkm291WYFt6cI0Iks5tD1HOgaJpZM4RMBZn
.

The wasm32-unknown-unknown builds work (FYI, those are all release builds as rustc itself isn't able to properly do a debug build for that target yet), as do all of the debug *-emscripten ones. The Emscripten release builds check the generated .js file's syntax, which is why they fail.

You need to change this:

let callback = @{callback};

into this:

var callback = @{callback};

in html.rs#48

@koute Thank you for the explanation! You've helped us to fix that.
Huge and Special Thanks for stdweb and carg-web! It's vital to this framework.

Closing since asmjs-unkown-emscripten, wasm32-unknown-emscripten, and wasm32-unknown-unknown - debug have been supported for some time (debug and release)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nixpulvis picture nixpulvis  Â·  4Comments

kellytk picture kellytk  Â·  4Comments

Boscop picture Boscop  Â·  4Comments

sanpii picture sanpii  Â·  3Comments

ghost picture ghost  Â·  5Comments