Skip to content

Getting Started

XQUIC supports usage on Linux, macOS, Windows, Android, iOS and HarmonyOS.

If you are new to XQUIC, please overview the following steps to make sure you have all the dependencies ready.

Let's get start by fetching XQUIC source code.

bash
git clone https://github.com/alibaba/xquic.git
cd xquic

Install dependencies

To simply build XQUIC, the following tools are required:

  • CMake : CMake is the de-facto standard for building C++ code, which is a powerful, comprehensive solution for managing the software build process.
  • BoringSSL or BabaSSL : BoringSSL and BabaSSL are open-source SSL libraries, used to implement TLS operations.
    • golang : Golang is needed for building BoringSSL.

To run test cases, you need the following tools in addition:

  • libevent : required by ./tests/test_client.c and ./tests/test_server.c.
  • CUnit : required by files under./tests/unittest/.

Cmake

XQUIC source code is organized and built with cmake, so it's necessary to have cmake installed first.

It's recommended to install cmake from its official website or repository.

Third-party libraries

XQUIC relies on BoringSSL or Tongsuo(BabaSSL) to perform efficient cryptographic operations, so make sure you have at least one of them prepared.

The detailed compiling steps of building BoringSSL/BabaSSL on Linux/macOS/Windows are quite different, so please refer to the following pages for details:

If you are about to generate .so files for Android/iOS/HarmonyOS, please refer to the above-mentioned pages as your compilation platform. After that, refers to page:

libevent

Example of client/server(both in ./tests/) are provided to help you understand how to use XQUIC, which take advantage of libevent to handle asynchronous events.

It's recommended to install and build libevent from its github repository according to the platform you are using.

CUnit

CUnit is used to range and execute files under ./tests/unittest/, which contains a set of cases to test different features of XQUIC.

CUnit is required as long as XQUIC is built with cmake variable -DXQC_ENABLE_TESTING=1.

It's recommended to install and build CUnit from its github repository according to the platform you are using.