Hi,
I was interested in seeing if I could run differential-dataflow on the web by compiling to WebAssembly using wasm-pack and it worked out really well! However it required some hacks changes to differential-dataflow and timely-dataflow, specifically:
- For both packages, replacing
std::time::Instant with web_time::Instant - crate: web-time This is because there is no "current time" implemented for the wasm32-unknown-unknown compilation target - so we have to hook it up to the browser's Performance.now() function. In all other contexts this uses the regular std::time::Instant under the hood so shouldn't make any difference.
- Differential dataflow has a 63 bit shift
(1 << 63) which needs to be (1 << 31) in 32-bit WebAssembly.
The changes required are:
I was wondering if you would be interested in incorporating this or would prefer to keep this kind of change as a fork?
Hi,
I was interested in seeing if I could run differential-dataflow on the web by compiling to WebAssembly using wasm-pack and it worked out really well! However it required some
hackschanges to differential-dataflow and timely-dataflow, specifically:std::time::Instantwithweb_time::Instant- crate: web-time This is because there is no "current time" implemented for thewasm32-unknown-unknowncompilation target - so we have to hook it up to the browser's Performance.now() function. In all other contexts this uses the regularstd::time::Instantunder the hood so shouldn't make any difference.(1 << 63)which needs to be(1 << 31)in 32-bit WebAssembly.The changes required are:
I was wondering if you would be interested in incorporating this or would prefer to keep this kind of change as a fork?