Basic example of running Arrow C++ under WASM.
- Create and use a Status object
- Create an Array
- Create an Array from user input
- Call a compute kernel on that Array
- Show result to user
- git
- emsdk
- A WASM-compatible build of Arrow C++
See https://arrow.apache.org/docs/developers/cpp/emscripten.html.
The following CMake preset is what I'm currently using but this can probably be removed once I fix build.sh to pass the right flags.
{
"name": "user",
"description": "",
"displayName": "",
"inherits": [
"features-emscripten"
],
"cacheVariables": {
"ARROW_WITH_SNAPPY": "OFF",
"ARROW_SUBSTRAIT": "OFF",
"ARROW_WITH_BROTLI": "OFF",
"ARROW_ORC": "OFF",
"ARROW_ACERO": "OFF"
}
}
source emsdk/emsdk_env.sh
sh build.sh
When you open a web browser capable of running WASM binaries, you should see "0" printed to the developer console.