µrt is a custom AWS Lambda runtime for C++ applications.
- Single-digit millisecond cold starts, no dynamic memory allocations
- One header file, no third-party dependencies
Add the header file to your project by hand or install via CMake.
cmake_minimum_required(VERSION 3.22.2)
project(example)
set(CMAKE_CXX_STANDARD 17)
include(FetchContent)
FetchContent_Declare(
urt
GIT_REPOSITORY https://github.com/vassbence/urt.git
GIT_TAG v0.3.0
)
FetchContent_MakeAvailable(urt)
add_executable(${PROJECT_NAME} "main.cpp")
target_link_libraries(${PROJECT_NAME} PRIVATE urt)#include <urt.h>
int main() {
urt::run([](std::string_view event) {
return "{\"message:\":\"hello, world!\"}";
});
}See the example folder in the repository for a complete implementation.
Follow the official deployment guide from AWS. Use the provided.al2023 runtime and name your compiled executable bootstrap.
MIT license