Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support WASM build #225

Open
xudesheng opened this issue Jul 20, 2024 · 1 comment
Open

support WASM build #225

xudesheng opened this issue Jul 20, 2024 · 1 comment

Comments

@xudesheng
Copy link

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};
@s3bk
Copy link
Contributor

s3bk commented Jul 20, 2024

Thanks. I applied your fix. I think cargo-update should pull in the new version. If not I need to release a new version of pdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants