mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Merge upstream/changelog-26.6 (9593 commits) into our debranded fork. - 190 conflicts resolved: 24 delete-side kept-removed (grpc/arrowflight/gcloud), submodules+version→26.6, contrib/CMakeLists keeps zap + new libpng, drops capnproto (zap provides kj), Server.cpp/CMakeLists re-apply the ZAP wiring + gRPC/arrowflight/gcloud removal. - Full-tree debrand re-swept over the new 26.6 code (uniform Datastore naming; Azure fork Clickhouse* symbols preserved). 0 clickhouse in product src/programs/CMakeLists. - Version now 26.6.1.1. gRPC/google-cloud/chdig stay removed; ZAP remains the transport.
58 lines
2.2 KiB
CMake
58 lines
2.2 KiB
CMake
option(ENABLE_WASMTIME "Enable WasmTime engine" ${ENABLE_LIBRARIES})
|
|
|
|
# MSAN: Disabled due to false-positives in WasmTime
|
|
# We tried to do __msan_unpoison memory coming from jit generated code,
|
|
# however sometimes sanitizer trap happened without entering code on our side,
|
|
# e.g. while handling wasm traps.
|
|
if (NOT ENABLE_WASMTIME OR NOT ENABLE_RUST OR (SANITIZE STREQUAL "memory"))
|
|
message (STATUS "Not using wasmtime")
|
|
return()
|
|
endif()
|
|
|
|
if (OS_FREEBSD OR NO_ARMV81_OR_HIGHER OR ARCH_S390X)
|
|
message (STATUS "Unsupported architecture for WasmTime")
|
|
return()
|
|
endif()
|
|
|
|
set (WASMTIME_SOURCE_DIR "${Datastore_SOURCE_DIR}/contrib/wasmtime")
|
|
set (WASMTIME_BINARY_DIR "${Datastore_BINARY_DIR}/contrib/wasmtime")
|
|
|
|
add_library(_ch_wasmtime INTERFACE)
|
|
|
|
set(WASMTIME_FEATURE_WAT ON)
|
|
set(WASMTIME_FEATURE_COREDUMP ON)
|
|
set(WASMTIME_FEATURE_ADDR2LINE ON)
|
|
set(WASMTIME_FEATURE_DEMANGLE ON)
|
|
set(WASMTIME_FEATURE_CRANELIFT ON)
|
|
set(WASMTIME_FEATURE_DEBUG_BUILTINS ON)
|
|
set(WASMTIME_FEATURE_GC ON)
|
|
set(WASMTIME_FEATURE_GC_NULL ON)
|
|
|
|
set(WASMTIME_FEATURE_PROFILING OFF)
|
|
set(WASMTIME_FEATURE_CACHE OFF)
|
|
set(WASMTIME_FEATURE_PARALLEL_COMPILATION OFF)
|
|
set(WASMTIME_FEATURE_WASI OFF)
|
|
set(WASMTIME_FEATURE_LOGGING OFF)
|
|
set(WASMTIME_FEATURE_DISABLE_LOGGING ON)
|
|
set(WASMTIME_FEATURE_THREADS OFF)
|
|
set(WASMTIME_FEATURE_GC_DRC OFF)
|
|
set(WASMTIME_FEATURE_ASYNC OFF)
|
|
set(WASMTIME_FEATURE_WINCH OFF)
|
|
|
|
set(WASMTIME_HEADER_DST ${WASMTIME_BINARY_DIR}/include)
|
|
set(WASMTIME_HEADER_SRC ${WASMTIME_SOURCE_DIR}/crates/c-api/include)
|
|
target_include_directories(_ch_wasmtime SYSTEM INTERFACE ${WASMTIME_HEADER_DST})
|
|
|
|
configure_file("${WASMTIME_HEADER_SRC}/wasmtime/conf.h.in" "${WASMTIME_HEADER_DST}/wasmtime/conf.h" NEWLINE_STYLE CRLF)
|
|
file(COPY "${WASMTIME_HEADER_SRC}/" DESTINATION "${WASMTIME_HEADER_DST}" FILES_MATCHING REGEX "\\.hh?$")
|
|
|
|
# Set IMPORTED_LOCATION before calling config_crate_flags so the localize
|
|
# step finds the .a at the correct path (workspace root, not this subdir).
|
|
set_target_properties(_ch_rust_wasmtime PROPERTIES
|
|
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/../lib_ch_rust_wasmtime.a")
|
|
datastore_config_crate_flags(_ch_rust_wasmtime)
|
|
|
|
target_link_libraries(_ch_wasmtime INTERFACE _ch_rust_wasmtime)
|
|
|
|
add_library(ch_rust::wasmtime ALIAS _ch_wasmtime)
|