#3178·opa

wasm: investigate options for data sharing

Author: srenatusCreated Feb 23, 2021Updated Sep 14, 2026
Labelsir/wasminvestigating

Currently, each Wasm VM instance in OPA has its own representation of the data in memory.

It would be nice to have them share that, since it's read-only anyways. Memory usage shouldn't be # of VMs x data size.

To investigate:

  • Is this what the "threads" proposal's shared memory covers?
    • Is our runtime capable of that?
  • Are there other ways?
    • Could every data-lookup be a function call to some imported function that brokers data access? How's the performance of that?