Skip to content

std::time::Instant not supported by WebAssembly #1022

@niklaskorz

Description

@niklaskorz

The std::time::Instant type used in the egui-winit crate is not supported when running through WebAssembly:

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

WebAssembly could potentially be supported in egui-winit by using a crate such as https://github.com/sebcrozet/instant instead, which only re-exports the std::time::Instant type on native but implements a polyfill for WebAssembly targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions