Here's my attempt at wrapping FastText C++ library with Golang CGO.
git
make
- And other requirements for the FastText library.
-
Clone the
FastText
git repository & compile it.$ git clone https://github.com/facebookresearch/fastText # Cloning... $ cd fastText && make # Compiling...
-
Clone this repository & copy all the
.o
from previous compile result into directory insidefastText/obj
.$ git clone https://github.com/taufik-rama/fasttext-go-wrapper # Cloning... $ mkdir fastText/obj $ cp /path/to/previous/repo/*.o fastText/obj/
-
Compile the C project
$ cd fastText && make # Compiling...
-
Build the Go package normally
$ go build # Compiling...