# Installation

> StringZilla for Go

Add the module to your project with `go get`:

```sh
go get github.com/ashvardanian/stringzilla/golang
```

The binding links `libstringzilla_static` through `cgo`, so programs carry it whole and need no shared library at runtime.
Build it with the `release_shared` preset and copy it next to the Go sources:

```sh
cmake --preset release_shared
cmake --build --preset release_shared --target stringzilla_static
cp build_release_shared/libstringzilla_static.a golang/
```

An archive elsewhere, like the one `STRINGZILLA_LIBRARY_DIR` names for the Rust crate, links through `CGO_LDFLAGS="-L$STRINGZILLA_LIBRARY_DIR"`.

Import it as:

```go
import sz "github.com/ashvardanian/stringzilla/golang"
```

