Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates a C SDK to interact with the server #2

Merged
merged 36 commits into from
Oct 17, 2023
Merged

Creates a C SDK to interact with the server #2

merged 36 commits into from
Oct 17, 2023

Conversation

auyer
Copy link
Owner

@auyer auyer commented Oct 13, 2023

This PR creates a SDK in C for the MemoryKV server. It should give access to the HTTP routes in a simple manner.

I used:

  • libcurl to call the HTTP endpoints from C, because it is a well known library and works on almost any system.
  • CMake to make it easier to build and link the library and the example.
  • clang-tidy for static analysis/linting and clang-format for formatting
  • for the result struct, I wanted a Rust Result feeling, and took inspiration from this gist: https://gist.github.com/f0rki/9b2c2b73d46ccdad2b39ab79b3a5517f

I had not used C for a long time. It was fun!

Code Review

I asked for a code review in codereview.stackexchange.com and got a great response, that helped me improve this code. Thanks Harith !

https://codereview.stackexchange.com/questions/287460/small-http-client-sdk-created-using-libcurl-in-c-language/

@auyer auyer added the 🚀 Feature New feature label Oct 13, 2023
@auyer auyer merged commit 635f086 into main Oct 17, 2023
4 checks passed
@auyer auyer deleted the c_sdk branch October 17, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant