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

Deprecate stdweb support? #1662

Closed
ryanisaacg opened this issue Aug 18, 2020 · 7 comments
Closed

Deprecate stdweb support? #1662

ryanisaacg opened this issue Aug 18, 2020 · 7 comments
Labels
C - needs discussion Direction must be ironed out DS - web S - meta Project governance

Comments

@ryanisaacg
Copy link
Contributor

We're currently on the hook for maintaining two different web backends, and I'm not sure how much sense that makes going forward.

Supporting both stdweb and web-sys made sense when the web backend was created, because they were both actively developed projects with no clear 'better' choice. I'm not sure it makes sense going forward, given stdweb hasn't had a commit merged in around 10 months, including various PRs that have been piling up.

Additionally, contributions from downstream users (the lifeblood of the web backend, now that I'm too busy to actively develop it) don't always support stdweb (see #1659, #1652)

I see two possible paths forward:

  • Continue to merge PRs that exclusively fix or improve the web-sys backend, letting stdweb fall out of feature parity
  • Make a hard break and remove stdweb support in the next breaking change
@ryanisaacg ryanisaacg added DS - web C - needs discussion Direction must be ironed out S - meta Project governance labels Aug 18, 2020
@francesca64
Copy link
Member

Looks like we're not the only ones: sebcrozet/kiss3d#241

I'd favor outright removing it, unless you believe it'd be very upsetting to users. I don't think we should have support for things we don't actually support, since then we'd have to document "this is the worse backend that we care less about, so you probably shouldn't use it", which would really raise the question of why it's included in the first place.

@alvinhochun
Copy link
Contributor

Frankly I don't really care about stdweb due to its current status of being unmaintained. One advantage of stdweb over web-sys is that it can be used with both cargo web and wasm-bindgen (albeit with a small issue which requires a patch), but since winit has a web-sys implementation this doesn't matter. Also because of this, I have no reason to actually use the stdweb backend and thus I'm reluctant to modify it as I'm not familiar with it and I wouldn't really test it properly and extensively.

+1 on removing it, personally.

Would you consider looking for more outside opinion (e.g. on users.rust-lang and r/rust)?

@alvinhochun alvinhochun mentioned this issue Sep 17, 2020
6 tasks
@alvinhochun
Copy link
Contributor

(In reply to #1704 (comment))

deprecating it now and waiting to remove it until 0.24.0 would be the conservative approach. However, if you believe that fairly few people are currently using the stdweb backend and/or if migrating is easy, then I think we should just be aggressive and remove it now.

I can't tell exactly how many people are using the stdweb backend, but searching for winit + stdweb on github yields 24 results, while searching for winit + web-sys yields 72 results. This does not account for any projects not publicly accessible on github, and the search results does not indicate actual usage.

I scanned through the search result and it seems like A/B Street is the only project on github that actually is using winit with stdweb. I think we should at least ask for their opinion.

I wouldn't say migrating from stdweb to web-sys is easy. While stdweb and web-sys can be used together, not being able to use cargo-web may be a significant downside to some.

@alvinhochun
Copy link
Contributor

The developers of A/B Street doesn't mind migrating to web-sys.

@dabreegster
Copy link

I'm having a little trouble merging all of the different tutorials for working with web-sys. Has anybody here managed to run examples/web.rs using web-sys? It would be immensely helpful to document the commands in that file. wasm-pack build -- --example web doesn't work, because crate-type must be cdylib to compile to wasm32-unknown-unknown

@alvinhochun
Copy link
Contributor

It makes sense that winit should provide a more complete example that shows how to build a complete project using wasm-bindgen or wasm-pack. Unfortunately it is a bit unergonomic due to wasm-pack not yet working with bin crates and example targets (rustwasm/wasm-pack#734). There also isn't a good equivalent to cargo web start.

I have several test project setups for wasm-pack which all have different issues (mostly with ergonomics). But whatever you do you need to make a cdylib crate and declare a custom entry point function with #[wasm_bindgen(start)], which means it is currently impossible to run the example in-place.

@maroider
Copy link
Member

stdweb support has been removed for a while now. I'm closing this issue for now and tracking the need for a more complete WASM example in #2045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out DS - web S - meta Project governance
Development

No branches or pull requests

5 participants