Skip to content

Commit e24a6e8

Browse files
authored
Merge pull request #3223 from dolthub/aaron/update-readme-icu4c
README.md: Add notes to the readme indicating cgo dependency.
2 parents 9067f45 + 2318e83 commit e24a6e8

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img height="240" src="./mascot.png"/>
22

3-
# A MySQL compatible database engine written in pure Go
3+
# A MySQL compatible database engine written in Go
44

55
**go-mysql-server** is a data-source agnostic SQL engine and server
66
which runs queries on data sources you provide, using the MySQL
@@ -56,6 +56,20 @@ directory with the `go.mod` file, run:
5656
go get github.com/dolthub/go-mysql-server@latest
5757
```
5858

59+
To implement ICU-compatible regexes, `go-mysql-server` has a dependency on
60+
[go-icu-regex](github.com/dolthub/go-icu-regex), which has a Cgo dependency on
61+
[ICU4C](https://unicode-org.github.io/icu/userguide/icu4c/). To build a project
62+
which depends on `go-mysql-server`, you should have a C/C++ toolchain, you
63+
should build with Cgo enabled, and you should have libicu-dev, or the
64+
equivalent for your environment, installed and available to your C++ toolchain.
65+
66+
For convenience, `go-mysql-server` also includes a non-compatible regex
67+
implementation based on the Go standard library `regex.Regex`. To build against
68+
that, instead of the `go-icu-regex` implementation, you must compile with
69+
`-tags=gms_pure_go`. Please note that some of go-mysql-server's tests do not
70+
pass with `-tags=gms_pure_go` and in general `gms_pure_go` is not recommended
71+
for users seeking MySQL compatibility.
72+
5973
## Using the in-memory test server
6074

6175
The in-memory test server can replace a real MySQL server in

internal/regex/regex_pure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !cgo || gms_pure_go
1+
//go:build gms_pure_go
22

33
package regex
44

0 commit comments

Comments
 (0)