CPP SDK #1471
Conversation
Greptile SummaryThis PR adds a complete C++20 SDK generator targeting Appwrite, producing a monolithic header-only library with coroutine-based async dispatch, chunked file uploads, and Realtime WebSocket support. All P0/P1 issues from prior review rounds (dangling Confidence Score: 4/5Safe to merge; remaining findings are P2 suggestions that do not block production use. All previously flagged P0/P1 issues are resolved. Two new P2 findings remain: cancellation not honored during retry sleeps in upload_chunks, and Subscription::callback being a detached copy that silently ignores post-call mutations. Neither causes a crash or data loss. templates/cpp/include/client.hpp.twig (retry cancellation gap), templates/cpp/include/services.hpp.twig (Subscription callback copy semantics) Important Files Changed
Reviews (9): Last reviewed commit: "fix(cpp): return getHeaders by value to ..." | Re-trigger Greptile |
…or(), add upload retry
3ff4b80 to
2656fec
Compare
…kpressure and POST retry design
…oad maxRetries logic
|
@ChiragAgg5k could you run jobs/workflows |
What does this PR do?
Adds a C++ SDK generator targeting C++20. The generated SDK is monolithic and header-only—users can drop
include/appwriteinto their project and link againstcprandnlohmann/jsonwithout any precompilation or complex build step.Key Features of the C++ SDK:
include/appwrite/services.hppentry point. No separate compilation units or static/dynamic linking required for the SDK itself.Task<T>type provides a coroutine-compatible interface (co_await), allowing async API calls to feel natural while maintaining readability.callBytes), and automaticx-appwrite-idpropagation for resumable-style large file handling.shared_ptr<const Config>with mutex protection, making it safe for concurrent use across multiple threads.Test Plan
Verified with 443 passing assertions against the Appwrite Mock API via
Cpp20Test.php. The suite covers:x-appwrite-idpropagation.Related PRs and Issues
Contributing Guidelines
Yes