- Minimum version: 14.0.0
- Recommended version: 18.x or 20.x LTS
| OS | Architecture | Library |
|---|---|---|
| Linux | x64 | libcqlai.so |
| Linux | arm64 | libcqlai.so |
| macOS | x64 | libcqlai.dylib |
| macOS | arm64 (M1/M2) | libcqlai.dylib |
| Windows | x64 | cqlai.dll |
The library is built from source during npm install, so the correct format is automatically generated for your platform.
The native library is compiled from Go source during npm install. The following are required:
- Minimum version: 1.21
- Download: https://golang.org/dl/
Installation:
# Ubuntu/Debian
sudo apt update
sudo apt install golang-go
# Fedora/RHEL
sudo dnf install golang
# macOS (Homebrew)
brew install go
# Manual installation
wget https://go.dev/dl/go1.21.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/binVerify installation:
go version
# go version go1.21.x linux/amd64Go requires a C compiler for building shared libraries (-buildmode=c-shared).
Ubuntu/Debian:
sudo apt install build-essentialFedora/RHEL:
sudo dnf groupinstall "Development Tools"macOS:
xcode-select --installVerify CGO is enabled:
go env CGO_ENABLED
# Should output: 1| Database | Versions | Notes |
|---|---|---|
| Apache Cassandra | 3.11.x, 4.0.x, 4.1.x, 5.0.x | Full support |
| DataStax Enterprise | 6.x, 7.x | Full support |
| DataStax Astra | - | Via secure connect bundle |
| ScyllaDB | 4.x, 5.x, 6.x | Compatible |
- CQL Binary Protocol v3, v4, v5
- TLS/SSL connections
- Username/password authentication
- Client certificate authentication
| Package | Version | Purpose |
|---|---|---|
| koffi | ^2.9.0 | FFI bindings to native library |
Managed automatically via go.mod:
| Package | Purpose |
|---|---|
| gocql | Cassandra driver |
| Component | Size |
|---|---|
| npm package (source) | ~500 KB |
Built library (libcqlai.so) |
~12 MB |
| Go module cache (build time) | ~50 MB |
- Build time: ~200 MB RAM
- Runtime: Depends on query results and connection pool size
Build requires internet access to download Go dependencies (first build only).
Error: Go is not installed or not in PATH
Install Go and ensure it's in your PATH:
export PATH=$PATH:/usr/local/go/bingo build: -buildmode=c-shared requires CGO
Enable CGO and install a C compiler:
export CGO_ENABLED=1
sudo apt install build-essential # Ubuntu/DebianMissing C library. Install development packages:
sudo apt install libc6-dev # Ubuntu/DebianFirst build downloads Go dependencies. Ensure internet connectivity and wait for completion. Subsequent builds are faster (cached dependencies).