Skip to content

INSO-World/git_analysis_wasm_poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BINOCULAR WASM POC

This project contains a Proof of Concept, that evaluates if it is possible to analyze git repositories in WebAssembly.

Building the project

To build the project navigate to the ./backend folder and run zig build. Ensure that you have ZIG 0.14 installed.

Preparing a repository

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−∗.pack

Web Version

To 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.

Native Version

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.

Node version

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages