Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

println cause panic with wasm32-unknown-unknown target #228

Closed
huangjj27 opened this issue May 10, 2018 · 3 comments
Closed

println cause panic with wasm32-unknown-unknown target #228

huangjj27 opened this issue May 10, 2018 · 3 comments

Comments

@huangjj27
Copy link
Contributor

Description

I'm submitting a bug report

stdout can't be accessed when use wasm32-unknown-unknown

Expected Results

the println should print to back-end when use cargo web start

Actual Results

panic at front-end as follow

Context (Environment)

  • Rust: rustc 1.27.0-nightly (e82261dfb 2018-05-03)
  • yew: master branch, no specified
  • target: wasm32-unknown-unknown,
  • cargo-web: 0.6.10

  • browser if relevant

@huangjj27
Copy link
Contributor Author

remove println make it works. I may push the fixed version of this example latter.

@therustmonk
Copy link
Member

You are right, wasm32-unknown-unknown doesn't have stdout and we have to avoid using prints.
If you will have time, I will be glad to your PR/fixes 👍

@huangjj27
Copy link
Contributor Author

logger replaced and work fine in wasm32-unknown-unknown target. the issue is to be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants