Skip to content

support WASM build #225

Description

@xudesheng

I want to use this crate in WASM. However, it's blocked by the "std::time" in the dependency of "globalcache". But I couldn't find anywhere to submit a PR for the global cache crate, so I want to put my comment here.

The fix is straightforward:

  1. Add "web-time" to the globalcache:
[dependencies]
web-time = "1.1.0"
  1. change the sync.rs
    Original code:
use std::time::{Instance, Duration};

New code:

use web_time::{Instant, Duration};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions