Skip to content

statsig-io/cpp-server-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statsig C++ Server SDK

The Statsig C++ SDK for multi-user, server side environments. If you need a SDK for another language or single user client environment, check out our other SDKs.

Statsig helps you move faster with Feature Gates (Feature Flags) and Dynamic Configs. It also allows you to run A/B tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, create an account at statsig.com.

Getting Started

CMake

  1. Create a .cmake file that downloads the SDK at build time.
FetchContent_Declare(statsig
        GIT_REPOSITORY    https://github.com/statsig-io/private-cpp-server-sdk.git
        GIT_TAG           v0.1.0
)

FetchContent_MakeAvailable(statsig)
  1. Include the .cmake file in your CMakeLists.txt
cmake_minimum_required(VERSION 3.11)

include(FetchContent)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/statsig.cmake)
  1. Configure build options (optional)
option(STATSIG_BUILD_TESTS "Compile with unit tests" OFF)
option(STATSIG_INCLUDE_MAXMINDDB "Include the 3rd party library maxminddb. (Disable if country lookup is not needed)" ON)

NOTE: Our SDK requires a minimum c++17 standard version

Testing

CMake

You can set the option set(STATSIG_BUILD_TESTS ON) in your CMakeLists.txt to include tests in your build.

To run the tests, use the command ctest --test-dir build/tests

See the ctest manual for more options.

Guidelines

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •