Open smacker opened 6 years ago
Used ecmascripten to cross-compile both, libxml2 and libuast to JS/wasm on one of the OSDs, for the purpose of running it on BigQuery. Examples work after cross-compilation with browser and node for me, but resulting binary is few Mbs so not possible to fit 1mb BigQuery external UDF limit.
Did not peruse it any further, but would be happy to share if somebody what's to apply it in dashboard.
Example of using cross compiled libuast is here: https://github.com/smacker/in-browser-uast
there is an example which is a simplified version of the dashboard.
The current size of wasm+js is ~750kb.
implemented here: https://github.com/smacker/dashboard/tree/bblfsh_js
Any plans to integrate it?
Currently, for x-path filtering we use libuast on server side. For every filter request we send all source code to the server, reparse it using bblfsh then applying filtering on server side.
Looks like we can skip most of this steps and simplify code if we would be able to compile libuast to js.
If it's possible, together with https://github.com/bblfsh/dashboard/issues/118 we will be able to remove backend almost completely.