This repository centralizes the client-side SDKs for Flipt.
These client-side SDKs are responsible for evaluating context and returning the results of the evaluation. They enable developers to easily integrate Flipt into their applications without relying on server-side evaluation.
Overall documentation for the client SDKs can be found on our website.
Also check out our introductory blog post on these client-side SDKs.
There are two versions of the client SDKs:
The Foreign Function Interface (FFI) versions of the client SDKs are currently available.
[!IMPORTANT] Our FFI SDKs currently only work with OSes that use the
glibc
C library. We are working on adding support for other OSes that usemusl
such as Alpine Linux. See this issue for more information.
The FFI based SDKs are currently supported on the following OSes/architectures:
The WebAssembly (WASM) version of the client SDKs is currently in beta. This version allows you to evaluate flags in the browser using WebAssembly which is OS and architecture agnostic.
The client SDKs are designed to be embedded in end-user applications.
The evaluation logic is written in Rust and can be found in the flipt-evaluation directory.
The language clients that are used in end-user applications wrap the engine can be found in the flipt-client-{language}
directories.
See ARCHITECTURE.md.
We are constantly growing our list of clients. Currently, we support the following languages/platforms:
Languages we are planning to support:
Want to see a client in a language we don't support? Open an issue and let us know!
Documentation for each client can be found in the README of each client's directory.
Please see each client's README for installation and usage instructions.
Why you may prefer to use a client-side SDK over our server-side SDKs:
We have done some simple benchmarking to test the performance of the client SDKs vs the server SDKs with Flipt running locally.
Here we performed 1000 evaluations of a flag using the client SDKs and the server SDKs. The client SDKs were able to perform the evaluations in a fraction of the time it took the server SDKs. This is because the client SDKs can perform the evaluations in memory without having to make a request to the Flipt server.
While the server SDKs performed evaluations in the range of 0-14ms, the client SDKs performed evaluations in the range of 0-0.1ms (100 microseconds).
See CONTRIBUTING.md.
We are not Rust experts and are constantly learning. If you see something that can be improved, especially in the flipt-engine-ffi and flipt-evaluation directories, please open an issue or a PR, we would love to learn from you. :heart:
All code in this repository is licensed under the MIT License.