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

Replace/augment Instant::now() so Timely could run in the browser #531

Closed
sergiyprotsiv opened this issue Aug 30, 2023 · 1 comment
Closed

Comments

@sergiyprotsiv
Copy link

Timely and Differential Dataflow can almost be compiled and run using WASM in the browser, at least with the single-threaded worker.

The only bit that prevents this is the use of std::time::Instant::now() which is not available in the wasm32-unknown-unknown target (as there is no access to system clock). In Timely this is only used in connection to logging and could be patched with about 10 changes across the crate.

The simplest solution would be to use the instant crate, which only has one dependence itself and works as std::time::Instant on all platforms other than WASM. An alternative could be to directly qualify the use of instants in Timely itself.

That said, I noticed there was an old issue about time in logging, so maybe my suggestion is not as innocuous as it seems.

@sergiyprotsiv
Copy link
Author

This is being addressed as part of TimelyDataflow/differential-dataflow#479.

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

1 participant