Skip to content

Suggestion: WebAssembly support #479

@oli-w

Description

@oli-w

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions