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

cargo-web is not compatible with web-sys #1081

Closed
kulicuu opened this issue Apr 7, 2020 · 6 comments
Closed

cargo-web is not compatible with web-sys #1081

kulicuu opened this issue Apr 7, 2020 · 6 comments
Labels

Comments

@kulicuu
Copy link
Contributor

kulicuu commented Apr 7, 2020

Working with master branch and also checked out recent commits on version 14.3 and 14.2 and I am getting the error that cargo-web is not compatible with web-sys.

I have --force upgraded cargo-web and am still getting the same error.

@kulicuu kulicuu added the bug label Apr 7, 2020
@jstarry
Copy link
Member

jstarry commented Apr 7, 2020

Yeah, it's not possible. You'll have to choose one or the other, sorry!

@jstarry jstarry closed this as completed Apr 7, 2020
@andersonevitt
Copy link

I'm confused, what should I do if I still want to use cargo-web or can I not use it all?

@jstarry
Copy link
Member

jstarry commented Oct 25, 2020

@andersonevitt I recommend checking out trunk: https://github.com/thedodd/trunk

Alternatively, you will have to use yew-stdweb to use cargo-web. But we will soon feature freeze yew-stdweb so I don't recommend it if you can avoid it

@ivnsch
Copy link

ivnsch commented Feb 21, 2021

The documentation at least should be improved, it's confusing currently:

Introduction > Using Cargo web:

Cargo web is a cargo subcommand for building client web apps. It makes building and deploying web applications incredibly easy [...]

Immediately after, the first tutorial (that appears to use web-sys):

Using wasm-pack is the preferred way to get up and running

It doesn't say that Cargo web doesn't work.

@teymour-aldridge
Copy link
Contributor

The documentation is correct(ish) for Yew 0.17.3. The latest version (from master) is at https://yew.rs/docs/en/next/ where this has been accordingly updated.

Cargo web does work, but support will be removed in the next release. If you want to use stdweb (strongly discouraged) you can with (yew-stdweb)[https://lib.rs/crates/yew-stdweb].

@ivnsch
Copy link

ivnsch commented Feb 21, 2021

Cargo web was removed from the new docs. This prevents the confusion 👍

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

No branches or pull requests

5 participants