This PoC is a C library that wraps Hazelcast C++ Client to provide Hazelcast functionalities natively in the C programming language.
hz_wrapper.h is the public C interface the user will interact and hz_wrapper.cpp is the implementation.
The resulting C library can be used by the example project.
Since this is a PoC, the only thing that's supported is IMap.get<string, int>
.
Here is how you can run the PoC yourself.
Install the following:
- CMake
- C/C++ compiler
- Hazelcast C++ Client (vcpkg installation is assumed below)
cmake -B build -S . \
-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
Add -DBUILD_SHARED_LIBS=1
for building shared library.
This will build both the C library and the example.
cmake --build build --verbose
Make sure you put some items into some map to query because the PoC doesn't support putting.
./build/example/main
Example output:
input map and key name: ages yunus
23