Skip to content

Build & Toolchains

This section describes how the DaaS-IoT SDK and its language/platform bindings are built, how native components are integrated, and how the toolchain resolves external dependencies such as the precompiled libdaas binaries.

This document applies to all SDKs: native C++, Qt, Python (pybind11), and Java (JNI).


1. Supported Toolchains

DaaS-IoT SDKs can be built using the following toolchains depending on platform:

GNU/Linux

  • GCC (>= 10)
  • Clang/LLVM
  • CMake (>= 3.24)
  • Ninja or Makefiles
  • Python 3.x / pip (for bindings)

Windows

  • MSVC (Visual Studio 2022 recommended)
  • CMake (>= 3.24)
  • Ninja or MSBuild
  • Qt MSVC kits (for Qt binding)

macOS

  • Apple Clang (Xcode toolchain)
  • CMake (>= 3.24)
  • Ninja

Android

  • Android NDK
  • Gradle
  • CMake (for JNI layer)

Each binding (Python, Qt, Java) includes its own build instructions in the corresponding directory.


2. Repository Structure Overview

The SDK repository does not include libdaas binaries directly.
It contains:

  • Source code of the wrappers (C++, Qt, Python, Java JNI)
  • Example projects
  • CMake build scripts
  • Fetch rules for external artifacts
  • Test utilities

The native runtime (libdaas) is always distributed externally.


3. Fetching Precompiled libdaas Artifacts

(FetchContent + MD5 Integrity Verification)

DaaS-IoT uses a deterministic build system based on remote precompiled artifacts.

The core native component, libdaas, is not stored inside the repo.
Instead, each SDK retrieves platform-specific binaries and header packs at build time.

This is done using:

  • CMake FetchContent
  • Version-specific download URLs
  • MD5 checksum verification (tamper protection)

Why this model?

  • Keeps repository lightweight
  • Ensures uniform builds across all OSes
  • Deployments get only their relevant binaries
  • Secure verification of artifacts before link stage
  • CI/CD can rebuild SDKs deterministically
  • Avoids bundling large binary folders inside the repo

3.1 FetchContent Structure (placeholder)

Below is an illustrative (placeholder) example of how a platform retrieves its native binary:

```cmake include(FetchContent)

FetchContent_Declare( libdaas URL "https://artifacts.sebyone.com/daasiot/libdaas-linux-x86_64-vX.Y.Z.tar.gz" URL_MD5 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" )

FetchContent_MakeAvailable(libdaas)