4

I have an application (in C++) right now that validates files against a format specification. The files to be validated can be quite large (usually 200 MB to 2 GB, but I've also seen files up to 50 GB). For the file access, I'm using a memory mapped file right now as it's easy & fast.

I now want to be able to deploy this as a webpage where the user can drop their files onto & then it'll be validated. Due to the file size, it doesn't make sense to upload it, so I was thinking about validating it in the browser directly.

Due to code base also being used for command line applications & as libraries for native applications, I was thinking about a webassembly variant of the validation.

Is there an efficient way using webassembly to do the validation in the browser? The only thing that I found so far was loading it into a JS-Array and then make it available to C++ - but that's very slow & limited in size (at least the way I'm doing it). What's the recommended way for such a use-case?

cdhowie
  • 158,093
  • 24
  • 286
  • 300
Tobias Langner
  • 10,634
  • 6
  • 46
  • 76

0 Answers0