A WebAssembly Project which uses C++ to deliver high-performance graph analytics.
This project is part of my UNSW Honours Thesis and the description can be found at TMS.
TO compile, ensure the igraph library has been built and build-wasm
includes the correct header files.
chmod +x build-wasm
./build-wasm
Steps to build igraph is located in src/wasm
.
To run locally, first use npm i
to install all node packages, then run the server using:
npm run dev
Currently, adding another algorithm requires a lot of file modification. The steps are:
- Create the function in C++
- the algorithm should be in a file located at
src/wasm/algorithms
- takes in input passed from JavaScript
- return a
val
object with necessary fields for rendering output
- the algorithm should be in a file located at
- Add this function to
EMSCRIPTEN_BINDINGS
insrc/wasm/graph.cpp
- Add the algorithm enum to
src/algorithms.js
- Add the input button to
src/App.jsx
- the button should be of type
AlgorithmInput
- the button should fall in the relevant accordian (collapsible)
- the button should be of type
- Add algorithm explanation (hover text)
src/components/AlgorithmExplanation
- Create the algorithm output file in
src/components/algorithmOutputs/NewAlgorithm.jsx
- Add to
src/components/algorithmOutputs/AlgorithmOutput.jsx
in thecomponents
list
Work is currently being done to make this easier with the new
algorithm-config.jsx
file. As of October 2024, this has been completed for Path Finding & Search algorithms. These steps will be updated once finished with all algorithms.