Skip to content

Commit

Permalink
docs: added prerequisites section
Browse files Browse the repository at this point in the history
  • Loading branch information
szkiba committed Oct 18, 2024
1 parent 4a4a9fe commit 3c56969
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,30 @@ export default function () {
## Usage

Check the [xk6-sql documentation](https://github.com/grafana/xk6-sql) on how to use this database driver.

## Build

Since the sqlite3 driver uses a native shared library, the build requirements are slightly different from other drivers.

**Prerequisites**

- [Go toolchain](https://go101.org/article/go-toolchain.html)
- A build toolchain for your system that includes `gcc` or
another C compiler. On Debian and derivatives install the `build-essential`
package. On Windows you can use [tdm-gcc](https://jmeubank.github.io/tdm-gcc/).
Make sure that `gcc` is in your `PATH`.
- Git
- Set `CGO_ENABLED=1` in the environment

**Linux**

```bash
CGO_ENABLED=1 xk6 build --with github.com/grafana/xk6-sql-driver-sqlite3 --with github.com/grafana/xk6-sql@latest
```

**Windows**

```
set CGO_ENABLED=1
xk6 build --with github.com/grafana/xk6-sql-driver-sqlite3 --with github.com/grafana/xk6-sql@latest
```

0 comments on commit 3c56969

Please sign in to comment.