I’m happy to say that we’re giving the first group their wish, and making the second group’s wishes more easily attainable. Couchbase Lite For C is a full implementation of Couchbase Lite with an ANSI C API, and no dependencies on a high-level runtime.
- The API functions are mostly one-to-one compatible with the class methods in the 2.x API. Some things are necessarily different because C does not come with automatic memory management or a high-level class library, but if you’re used to the Java/C#/Swift/Obj-C API you should be right at home — see some small code examples.
- It’s portable to any Unix-like OS (or recent MS Windows); it just needs a filesystem and TCP/IP networking.
- It should run on fairly constrained systems like the Raspberry Pi (but not Arduino…)
- The C API is easy to write language bindings for; there’s an example Python3 binding included.
- There’s also a C++ wrapper API that’s nicer to use, if you like C++.
That being said, this is early access to an alpha-quality project. Some functionality isn’t ready yet, there’s been little testing, and we haven’t yet ported it beyond macOS/Windows/Ubuntu. In other words, this is not yet an official Couchbase product, and we are not yet providing official support. But we are actively working on it, and we hope to get community involvement too.
A special shout-out to the brave few who have been learning and hacking on the internal Couchbase Lite Core API: Thanks for inspiring us to make this; we hope you’ll switch over to Couchbase Lite For C (it should be pretty easy) and keep helping out!