-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Because ObjectId needs to get the current time, it panics in wasm, which can't get the current time via std (see: https://github.com/rust-lang/rust/issues/48564).
Issue originally filed by sinhpham on GitHub (https://github.com/mongodb/bson-rust/issues/199):
Due to using std::time::SystemTime.
A potential solution is exposing a new_with_timestamp(n_secs_since_unix_epoch: u32) -> Self constructor. People who want to run on wasm can supply their own timestamp.
- related to
-
RUST-854 WebAssembly support
- Backlog