Manapi Http

Installation

How to install the library

Precompiled Binaries

The easiest way to install the library is to download it from the releases page. Typically, several precompiled packages are available.

Compile from Source

If the package you need isn't available on the releases page, you can compile the project yourself.

First, clone the project from https://github.com/xiadnoring/manapi-http and install all required dependencies. Then configure the project parameters and start the compilation.

cmake -B build -DMANAPIHTTP_BUILD_TYPE="lib" \
    -DMANAPIHTTP_JSON_DEBUG=ON \
    -DMANAPIHTTP_BUILD_METHOD="default" \
    -DMANAPIHTTP_QUICHE_DEPENDENCY=ON \
    -DMANAPIHTTP_OPENSSL_DEPENDENCY=ON \
    -DMANAPIHTTP_WOLFSSL_DEPENDENCY=OFF \
    -DMANAPIHTTP_GRPC_DEPENDENCY=ON \
    -DMANAPIHTTP_BROTLI_DEPENDENCY=ON \
    -DMANAPIHTTP_ZSTD_DEPENDENCY=ON \
    -DMANAPIHTTP_NGHTTP2_DEPENDENCY=ON \
    -DMANAPIHTTP_CPPTRACE_DEPENDENCY=OFF \
    -DMANAPIHTTP_NGHTTP3_DEPENDENCY=ON \
    -DMANAPIHTTP_ENABLE_TESTS=ON \
    -DMANAPIHTTP_STD_BACKTRACE_DEPENDENCY=ON \
    -DBUILD_SHARED_LIBS=ON

Build the project:

cmake --build build

And install:

cmake --install build

Using Conan v2

You can use Conan v2 to manage dependencies for the library. Install Conan v2 on your system and download all dependencies by executing the following command in the library directory:

conan create . -o "manapihttp/*:shared=True" -o "manapihttp/*:openssl_dependency=True" -o "manapihttp/*:quiche_dependency=True" -o "manapihttp/*:grpc_dependency=True" -o "manapihttp/*:zlib_dependency=True" -o "manapihttp/*:nghttp2_dependency=True" \
 -o "manapihttp/*:nghttp3_dependency=True" -o "manapihttp/*:lib=True" -o "manapihttp/*:wolfssl_dependency=False" --build missing --settings=build_type=Debug -o "manapihttp/*:curl_dependency=True" -o "abseil/*:shared=True" -o "grpc/*:shared=True" -o "protobuf/*:shared=True" --settings=compiler.cppstd=23

Experimental Method

Another way to download dependencies is using CMake's fetch mode. Set the MANAPIHTTP_BUILD_METHOD parameter to fetch and set MANAPIHTTP_DEPENDENCY_FETCH_SHARED to ON if you want to build shared libraries.

On this page