crates-io-api icon indicating copy to clipboard operation
crates-io-api copied to clipboard

Add WASM Support

Open jonaspleyer opened this issue 11 months ago • 1 comments

This PR makes the crates_io_api package able to be used in a WASM context. Some functionality such as std::time needed to be replaced with the web_time crate which exports std::time for non-wasm systems (such as x86). In total this PR does 3 things:

  1. Refactor Code; exlude shared functionality in utils.rs
  2. Loosen and Update Dependencies
  3. Rewrite async_client.rs file such that it can be compiled with the wasm32-unknown-unknown target triple.

All tests are still passing. Users which have used this package should not be affected by any of the changes made. Let me know what you think.

jonaspleyer avatar Jan 17 '25 19:01 jonaspleyer

Note that the most recent commits are part of an effort to have an intermediate package which can be used for publishing to crates.io.

jonaspleyer avatar Jan 27 '25 23:01 jonaspleyer