This project contains a Proof of Concept, that evaluates if it is possible to analyze git repositories in WebAssembly.
To build the project navigate to the ./backend folder and run zig build. Ensure that you have ZIG 0.14 installed.
Since this tool does not support packfiles, you will have to prepare a repositoy by running the following shell script and then zipping it:
mv . git/objects/pack/pack−∗.pack .
cat pack−∗.pack | git unpack−objects
rm pack−∗.packTo run the web version you need to have python installed (or any other software to host a specific folder).
Navigate to the backend folder and run python -m http.server and navigate to http://localhost:8000. Here you can upload a ZIP folder of a Git repository and you will get the results of the analysis in the browser console.
Upon building the project, the file ./backend/zig-out/bin/native_tool will be an executable, that can be used to perform the analysis. Either provide the path to the zip file as the first cli argument or enter it after starting the program.
The node version works similarly to the native version. Build the project and ensure, that the path in line 39 of native.js points to the correct WASM instance.
Furthermore, you will have to install the modules with npm install. Then you can run the tool with node native.js where you can append the filename of the ZIP file either as commandline argument or provide it afterwards.