Download the SDK
Where to get the SDK
The CI builds the Hot++ SDK after each change on the branch master. It puts the archives in the release latest. The release is a prerelease. Its notes give the commit of the build.
| File | System |
|---|---|
hotpp-sdk-linux-x86_64.tar.gz |
Linux, x86_64 |
hotpp-sdk-windows-x86_64.zip |
Windows, x86_64, MSVC |
Each archive has one top folder. This folder is the SDK prefix.
What the archive contains
bin/: the translatorhotcand the language serverhot-ls. The Windows SDK also haslibclang.dll.include/hot/: the headers of the runtime.lib/: the static libraries (the runtime, the AOT support, the translator and the backend).lib/cmake/Hot/: the CMake package (HotConfig.cmake) and the functionshot_add_hostandhot_add_scripts.lib/clang/<version>/include/(Windows only): the compiler headers thathotcuses to read your headers.share/hot/LICENSE: the license.
The SDK is relocatable. You can unpack it in any folder.
What your machine needs
- CMake 3.20 or later. On Linux, also Ninja or Make.
- Linux: libclang 23 and Clang 23. On Ubuntu, add the apt.llvm.org repository and install
clang-23,libclang-23-devandllvm-23-dev. Useclang++-23as the C++ compiler. - Windows: Visual Studio 2022 or newer with the C++ tools (the workload “Desktop development with C++”), and CMake. Build in Release or RelWithDebInfo. The CI builds the SDK with Visual Studio 2022 (toolset v143). A newer toolset links the static libraries of the SDK, an older toolset does not. The release notes give the toolset of the build.
The CI tests the SDK on each system with an AOT host (MODE AOT). On Windows, the modes HOT_RELOAD and PRECOMPILED also need a clang++.exe with the same major version as the SDK LLVM (23). find_package(Hot) looks for clang++ in this order:
- The value of
HOT_SCRIPT_COMPILER, if you set it. - The Visual Studio component “C++ Clang tools” (
VC/Tools/Llvm/x64/bin) of the Developer prompt or of the Visual Studio generator. - A
clang++onPATH.
A clang++ with an other major version gives a CMake warning. The clang++.exe of the LLVM release 23 for Windows is the safe choice. See Windows.
Use the SDK in your project
Use find_package(Hot) and hot_add_host in your CMakeLists.txt:
cmake_minimum_required(VERSION 3.20)
project(myapp CXX)
find_package(Hot REQUIRED)
add_executable(myapp main.cpp)
hot_add_host(TARGET myapp MODE AOT SCRIPTS wolf.hot
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS Creature.h)
Set CMAKE_PREFIX_PATH to the SDK folder when you configure:
cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH=/path/to/hotpp-sdk-linux-x86_64
cmake --build build
On Windows, use the same commands in the UCRT64 shell, with the path of the Windows SDK. The sample samples/aot is a complete project of this type.
Test the SDK
The project tests/sdk_smoke is a small consumer of the SDK. The CI uses it on each system. To test an SDK on your machine, run this command in the source tree of Hot++:
cmake -DSDK=/path/to/sdk -P tests/sdk_smoke/run.cmake
The script configures, builds and runs the project. It passes when the program prints sdk_smoke: result=41.
See also SDK and portable binaries and Windows.