go get github.com/unum-cloud/USearch/golangThe package links libusearch_static and includes the usearch/ headers, so both must sit on the compiler’s search paths, such as /usr/local/lib and /usr/local/include, or be named through CGO_LDFLAGS and CGO_CFLAGS.
To build them from a checkout of the main repository and point cgo at them for the current shell:
cmake --preset library -B build_release && cmake --build build_release
export CGO_CFLAGS="-I$PWD/c" CGO_LDFLAGS="-L$PWD/build_release"Every release also carries prebuilt libraries and headers, where <release_tag>, <arch> and <usearch_version> name the release and the machine:
- Linux:
dpkg -i usearch_linux_<arch>_<usearch_version>.debinstalls into/usr/local. - macOS: unpack
usearch_macos_<arch>_<usearch_version>.zip, then move the library into/usr/local/liband theusearchdirectory into/usr/local/include. - Windows:
.\usearch\winlibinstaller.bat, run in the folder where you willgo run, downloads the latest release’s library and headers into that folder.
Each archive downloads from https://github.com/unum-cloud/USearch/releases/download/<release_tag>/.