Add web features to the parking_lot dependency#225
Conversation
Run local-wasm-pack in release mode *for speed*.
anp
left a comment
There was a problem hiding this comment.
I think the "proper" way to do this in cargo is for each of these crates to have their own wasm-bindgen features, and then to depend on those features only when building for wasm32-unknown-unknown. That's going to be really painful though, so I'm thinking that we should probably switch from parking_lot's locks to std::sync's locks and avoid the issue altogether.
What do you think? I'm not sure parking_lot gets us much except for slightly more readable code.
Well this feature
Also i don't see how conditional compilation in rust is too complicated (please don't listen to me, I had C++ template meta-programing in my homework) |
|
Thank you again for this! It does locally resolve the chromedriver issue that is happening in CI, so I've cherry-picked these changes onto #226. Hopefully that will get CI unblocked. Replying:
Exactly -- since dyn-cache, moxie, and topo don't know whether they're being run on the web or not, forwarding the feature seems right. While the feature is a no-op on non-web targets right now, that could change. Don't worry about this, I'll take care of it in commits atop yours in #226. EDIT: done
Yep, I don't think stdweb would even work here.
I'm not sure starvation is actually what we want, but it's straightforward enough to pull this fix in and revisit later! |
|
Thank you again for finding this! I've landed #226 which includes these changes. |
Resolves #218.
The
parking_lotfor wasm32 on stable Rust will panic on attempt of parking thread. This makes it possible to rely on stable version ofparking_loteither with or without theatomicswasm32 target feature present. Therefore it is a step towards the stable toolchain (#221). Then the last step would be to disable (maybe conditionally) thenamed-profilescargo feature.While similar PR #219 conflicts with #223, this PR won't.