I suppose docs.rs or crates.io could find out whether or not a crate builds on WASM, but at the same time that often requires different features and they wouldn't know which feature combination to use. And even if it does build on WASM, it doesn't necessarily mean that it works. Lots of the standard library will panic if used on WASM, even though it will compile.
I haven't thought it through enough, but it seems like the best technique to help this situation would be to give some standardized, easy way to let crate authors indicate their WASM compatibility in a way that crates.io could read.
I guess it's somewhat similar to the
#[no_std] tag that gets added to n
Another thought, we do already have a
#wasm keyword on crates.io. Maybe we just start an initiative to start tagging WASM compatible crates with that keyword. Just some ideas.
Ah, yeah, that makes sense.
I'd think that if there were no other outstanding reasons that the library couldn't work on WASM that a PR would be welcome. At least I would like it if it were my crate!
It would make sense as a default feature that could be disabled to make it work on WASM.
Not at all.
Definitely. I haven't run into a use-case for it yet, because most of my processing tends to be server side, but I would do the same thing.