# Installation

> USearch for Go

```sh
go get github.com/unum-cloud/USearch/golang
```

The 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:

```sh
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>.deb` installs into `/usr/local`.
- __macOS__: unpack `usearch_macos_<arch>_<usearch_version>.zip`, then move the library into `/usr/local/lib` and the `usearch` directory into `/usr/local/include`.
- __Windows__: `.\usearch\winlibinstaller.bat`, run in the folder where you will `go 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>/`.

