Use web_time::SystemTime
instead of std::time::SystemTime To support time in browsers/wasm
re: #594
It would be better take this dependency as a feature option, even though it only gets used for wasm32-unknown-unknown, in order to minimize our dependency tree for most feature sets.
You can see how this was done in rustls-pki-types here for example
@DanGould should I do the target_family = "wasm", target_os = "unknown" stuff or is just a web feature enough for now? I was thinking just make a web feature and include it on the payjoin-ffi wasm feature
Pull Request Test Coverage Report for Build 13977217809
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 7 of 8 (87.5%) changed or added relevant lines in 3 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.03%) to 80.411%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| payjoin/src/receive/v2/error.rs | 0 | 1 | 0.0% |
| <!-- | Total: | 7 | 8 |
| Totals | |
|---|---|
| Change from base Build 13955812638: | 0.03% |
| Covered Lines: | 4848 |
| Relevant Lines: | 6029 |
💛 - Coveralls
Yes we do want the target as well because otherwise this could compile for targets where the proposed solution would not work
Closing this and #594 as no clear direction was decided on.