{"id":29016506,"url":"https://github.com/memgraph/mgclient","last_synced_at":"2025-06-25T22:30:32.065Z","repository":{"id":37933054,"uuid":"188198436","full_name":"memgraph/mgclient","owner":"memgraph","description":"C/C++ Memgraph Client","archived":false,"fork":false,"pushed_at":"2025-04-25T15:44:30.000Z","size":292,"stargazers_count":39,"open_issues_count":14,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-25T15:45:43.399Z","etag":null,"topics":["c","client","cpp","memgraph"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-23T09:00:23.000Z","updated_at":"2025-04-15T19:15:47.000Z","dependencies_parsed_at":"2024-05-29T15:27:13.590Z","dependency_job_id":"2c83c4f1-01da-4840-8641-4ad7d16fde0d","html_url":"https://github.com/memgraph/mgclient","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/memgraph/mgclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/mgclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fmgclient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962050,"owners_count":23236859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","client","cpp","memgraph"],"created_at":"2025-06-25T22:30:31.016Z","updated_at":"2025-06-25T22:30:31.970Z","avatar_url":"https://github.com/memgraph.png","language":"C++","readme":"[![Actions Status](https://github.com/memgraph/mgclient/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/memgraph/mgclient/actions)\n\n# mgclient\n\nmgclient is a C library interface for [Memgraph](https://www.memgraph.com)\ndatabase.\n\n## Building and installing on Apple\n\nTo build and install mgclient from source you will need:\n   - CMake version \u003e= 3.8\n   - OpenSSL version \u003e= 1.0.2\n   - Apple LLVM/clang \u003e= 8.0.0\n\nOnce everything is in place, create a build directory inside the project\nroot directory and configure the build by running CMake from it:\n\n```\nmkdir build\ncd build\ncmake ..\n```\n\nNOTE: Dealing with OpenSSL might be a bit tricky. If OpenSSL is not available\non the system, please use, e.g., [brew](https://brew.sh/) package manager to\ninstall OpenSSL with the following command:\n\n```\nbrew install openssl@1.1\n```\n\nIf `cmake` can't locate OpenSSL, please set `OPENSSL_ROOT_DIR` to a valid path.\nExamples follow:\n\n```\n# M1 with brew installed\ncmake -DOPENSSL_ROOT_DIR=\"$(brew --prefix openssl)\" ..\n\n# Using only ls command\ncmake -DOPENSSL_ROOT_DIR=\"$(ls -rd -- /usr/local/Cellar/openssl@1.1/* | head -n 1)\" ..\n```\n\nAfter running CMake, you should see a Makefile in the build directory. Then you\ncan build the project by running:\n\n```\nmake\n```\n\nThis will build two `mgclient` library flavours: a static library (named\n`libmgclient.a`) and a shared library (named `libmgclient.dylib`).\n\nTo install the libraries and corresponding header files run:\n\n```\nmake install\n```\n\nThis will install to system default installation directory. If you want to\nchange this location, use `-DCMAKE_INSTALL_PREFIX` option when running CMake.\n\n## Building and installing on Linux\n\nTo build and install mgclient from source you will need:\n   - CMake version \u003e= 3.8\n   - OpenSSL version \u003e= 1.0.2\n   - gcc \u003e= 8 or clang \u003e= 8\n\nTo install minimum compile dependencies on Debian / Ubuntu:\n\n```\napt-get install -y git cmake make gcc g++ libssl-dev\n```\n\nOn RedHat / CentOS / Fedora:\n\n```\nyum install -y git cmake make gcc gcc-c++ openssl-devel\n```\n\nOnce everything is in place, create a build directory inside the source\ndirectory and configure the build by running CMake from it:\n\n```\nmkdir build\ncd build\ncmake ..\n```\n\nAfter running CMake, you should see a Makefile in the build directory. Then you\ncan build the project by running:\n\n```\nmake\n```\n\nThis will build two `mgclient` library flavours: a static library (usually\nnamed `libmgclient.a`) and a shared library (usually named `libmgclient.so`).\n\nTo install the libraries and corresponding header files run:\n\n```\nmake install\n```\n\nThis will install to system default installation directory. If you want to\nchange this location, use `-DCMAKE_INSTALL_PREFIX` option when running CMake.\n\nIf you want to build and run tests, in the build directory run:\n\n```\ncmake -DBUILD_TESTING=ON -DBUILD_TESTING_INTEGRATION=ON ..\nctest\n```\n\n## Building and installing on Windows\n\nTo build and install mgclient from source on Windows you will need:\n   - CMake version \u003e= 3.8\n   - OpenSSL version \u003e= 1.0.2\n   - MinGW: gcc \u003e= 8 or Windows Compiler (take a look\n     [here](https://blog.knatten.org/2022/08/26/microsoft-c-versions-explained/)\n     to understand versioning in a bit more details):\n     VS \u003e= 17 2022, MSVC \u003e= 14.34, C \u003e= 19.34\n\n### Windows Compiler\n\n```\nmkdir build\ncd build\ncmake ..\ncmake --build .\n```\n\nDepending on where OpenSSL is installed you might need to define\n`OPENSSL_ROOT_DIR`, example follows:\n```\ncmake -DOPENSSL_ROOT_DIR=\"$VCPKG_ROOT\\installed\\x64-windows\" ..\n```\n\nTo install OpenSSL [vcpkg](https://vcpkg.io/en/index.html) can be used:\n```\nvcpkg install openssl:x64-windows\n```\nor you can download and install OpenSSL from\n[here](https://slproweb.com/products/Win32OpenSSL.html).\n\n### MinGW\n\n- Install MSYS2 from https://www.msys2.org/.\n- Install MinGW toolchain with the following command:\n  ```\n  pacman -S --needed git base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain mingw-w64-i686-cmake mingw-w64-x86_64-cmake mingw-w64-i686-openssl mingw-w64-x86_64-openssl\n  ```\n\nOnce the environment is ready, please run:\n\n```\nmkdir build\ncd build\ncmake .. -G \"MinGW Makefiles\"\ncmake --build . --target install\n```\n\n## Building WASM (Linux only)\n\nCompiling `mgclient` for wasm requires the Emscripten sdk. This is automated in\nthe following steps:\n  1. mkdir build \u0026\u0026 cd build\n  2. cmake .. -DWASM=ON\n  3. make\n\nNow there should be an `mgclient.js` and an `mgclient.wasm` found in\n`mgclient/build/`\n\n## Using the library\n\nThe library provides header files located under the include folder. All library\nfunctionality is documented in these files in Doxygen format. You can also\nbuild HTML version of the documentation by running `doxygen` command from\nproject root directory.\n\n## Examples\n\nAll the examples of the usage of the mgclient are contained in the\n[examples](examples) folder, including the C++ wrapper.\n\nAn example on how to include mgclient inside a CMake project is located under\n`examples/CMakeLists.txt`.\n","funding_links":[],"categories":["Database"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fmgclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fmgclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fmgclient/lists"}