When parking_lot
is used in a wasm
context, sometimes we run into an error with the unknwon
target
failed to resolve import `env::now`
The solution is here: Amanieu/parking_lot#269 (comment)
While you can lock parking_lot_core to anything below 0.8.1 (uses the InstantDummy) I would not recommend this. Instead I'd recommend to enable the necessary features transitively when using wasm-bindgen. That means for instant to work on wasm32 you have to enable the wasm-bindgen feature and depending on the platform and whether performance.now() is available, you also need to enable inaccurate.