simple vectordb cpp
1.0.0
Search Implementaion:

g++ -std=c++17 main.cpp -o ./main -I ./json/single_include/nlohmann
To build the project, follow these steps:
mkdir build
cd buildcmake ..make./SimpleHNSWemcc -std=c++17 main.cpp -o ./index.html -I ./json/single_include/nlohmann
To build this project for WebAssembly, follow these steps:
Install Emscripten by following the instructions here.
Set up the Emscripten environment:
source /path/to/emsdk/emsdk_env.shmkdir build-wasm
cd build-wasmcmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake ..makeThe output will be a WebAssembly module along with an HTML file (SimpleHNSW.html) that you can open in a web browser to run the compiled code.
The main.cpp file should remain the same as before, but you may need to adapt it to interact with JavaScript if necessary. For example, you can use emscripten::val to handle JavaScript interactions or create bindings using Emscripten's --bind feature.