Bevy: FrameTimeDiagnosticsPlugin fails on WASM

Created on 17 Nov 2020  路  2Comments  路  Source: bevyengine/bevy

Bevy version
current master branch

Operating system & version
Ubuntu 20.04

What you did
Run bevy text example with bevy_webgl2

What you expected to happen
Example runs without errors

What actually happened

panicked at 'time not implemented on this platform', library/std/src/sys/wasm/../unsupported/time.rs:39:9
core crash platform web

Most helpful comment

Just replace std::time::Instant with instant crate which supports wasm and is compatible with std. I think this was already done with some other part of bevy.

All 2 comments

Would we want to disable the plugin on WASM or find a workaround, because this is a limitation of WASM itself.

Just replace std::time::Instant with instant crate which supports wasm and is compatible with std. I think this was already done with some other part of bevy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cart picture cart  路  22Comments

stefee picture stefee  路  14Comments

cart picture cart  路  29Comments

qarmin picture qarmin  路  28Comments

cart picture cart  路  18Comments