diff --git a/.gitignore b/.gitignore index c4aa0d4d..78030176 100644 --- a/.gitignore +++ b/.gitignore @@ -48,5 +48,5 @@ tests/integration/logs data/ -examples/c/data-dir -examples/c/downloaded_hello.txt +tests/cbindings/data-dir +tests/cbindings/downloaded_hello.txt diff --git a/Makefile b/Makefile index a5cff65e..c60c5eb6 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ testIntegration: | build deps # Builds a C example that uses the libstorage C library and runs it testLibstorage: | build deps $(MAKE) $(if $(ncpu),-j$(ncpu),) libstorage - cd examples/c && \ + cd tests/cbindings && \ if [ "$(detected_OS)" = "Windows" ]; then \ gcc -o storage.exe storage.c -L../../build -lstorage -pthread && \ PATH=../../build:$$PATH ./storage.exe; \ diff --git a/README.md b/README.md index 346ddfdf..9575e2eb 100644 --- a/README.md +++ b/README.md @@ -67,23 +67,7 @@ This produces the shared library under `build/`. ### Run the Go example -Build the Go example: - -```bash -go build -o storage-go examples/golang/storage.go -``` - -Export the library path: - -```bash -export LD_LIBRARY_PATH=build -``` - -Run the example: - -```bash -./storage-go -``` +See https://github.com/logos-storage/logos-storage-go-bindings-example. ### Static vs Dynamic build diff --git a/examples/c/hello_world.txt b/tests/cbindings/hello_world.txt similarity index 100% rename from examples/c/hello_world.txt rename to tests/cbindings/hello_world.txt diff --git a/examples/c/storage.c b/tests/cbindings/storage.c similarity index 100% rename from examples/c/storage.c rename to tests/cbindings/storage.c