-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
As a small feature request, can the crate be annotated in some way to trigger a compile error on Wasm? I don't know if it's the best way, but an option I see from this Stack Overflow post is to call compile_error!() if the configuration target is Wasm. Something like:
#[cfg(target_family="wasm")]
compile_error!("The `interned-string` crate cannot run on WebAssembly due to needing multiple threads.");
The reason I ask is that I spent over an hour attempting to integrate interned-string into a Wasm project before realizing it would be hopeless, and the error message is very cryptic--it has to do with reentering a mutex.
I understand the limitation and can see reasons not to want to bother making it work on Wasm. It is a pity, though, to get a successful compile and then get a bizarre error message at run time.
Metadata
Metadata
Assignees
Labels
No labels