diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c4d56aadef..ec419d6a21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,8 +72,8 @@ jobs: - name: "Generate FFI" shell: bash run: | - chmod +x ffi-build.sh - ./ffi-build.sh ${OUTPUT_FOLDER} + chmod +x build-profiling-ffi.sh + ./build-profiling-ffi.sh ${OUTPUT_FOLDER} - name: 'Publish libdatadog' uses: actions/upload-artifact@v2 @@ -89,5 +89,5 @@ jobs: run: | mkdir examples/ffi/build cd examples/ffi/build - cmake -S .. -DDDProf_ROOT=$OUTPUT_FOLDER + cmake -S .. -DDatadog_ROOT=$OUTPUT_FOLDER cmake --build . diff --git a/Cargo.lock b/Cargo.lock index e0ad94dbc7..9580122d26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "datadog-profiling" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" dependencies = [ "anyhow", "bytes", @@ -139,7 +139,6 @@ dependencies = [ "hyper-multipart-rfc7578", "indexmap", "libc", - "maplit", "mime_guess", "percent-encoding", "prost", @@ -148,9 +147,23 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "datadog-profiling-ffi" +version = "0.8.0-alpha.1" +dependencies = [ + "anyhow", + "chrono", + "datadog-profiling", + "ddcommon", + "ddcommon-ffi", + "hyper", + "libc", + "tokio-util", +] + [[package]] name = "ddcommon" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" dependencies = [ "anyhow", "futures", @@ -173,29 +186,15 @@ dependencies = [ [[package]] name = "ddcommon-ffi" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" dependencies = [ "anyhow", "ddcommon", ] -[[package]] -name = "ddprof-ffi" -version = "0.7.0-rc.1" -dependencies = [ - "anyhow", - "chrono", - "datadog-profiling", - "ddcommon", - "ddcommon-ffi", - "hyper", - "libc", - "tokio-util", -] - [[package]] name = "ddtelemetry" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" dependencies = [ "anyhow", "ddcommon", diff --git a/Cargo.toml b/Cargo.toml index 9055b02b99..38669400f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ [workspace] members = [ - "ddprof-ffi", "profiling", + "profiling-ffi", "ddcommon", "ddcommon-ffi", "ddtelemetry", diff --git a/LICENSE-3rdparty.yml b/LICENSE-3rdparty.yml index e8cf793ebe..3ffc8d5be9 100644 --- a/LICENSE-3rdparty.yml +++ b/LICENSE-3rdparty.yml @@ -1,5 +1,5 @@ --- -root_name: "ddprof-ffi, datadog-profiling, ddcommon, ddcommon-ffi, ddtelemetry" +root_name: "datadog-profiling, ddcommon, datadog-profiling-ffi, ddcommon-ffi, ddtelemetry" third_party_libraries: - package_name: aho-corasick package_version: 0.7.18 diff --git a/ffi-build.sh b/build-profiling-ffi.sh similarity index 73% rename from ffi-build.sh rename to build-profiling-ffi.sh index 29e74ba91e..120b03a0c4 100755 --- a/ffi-build.sh +++ b/build-profiling-ffi.sh @@ -8,9 +8,9 @@ set -eu destdir="$1" -mkdir -v -p "$destdir/include/ddprof" "$destdir/lib/pkgconfig" "$destdir/cmake" +mkdir -v -p "$destdir/include/datadog" "$destdir/lib/pkgconfig" "$destdir/cmake" -version=$(awk -F\" '$1 ~ /^version/ { print $2 }' < ddprof-ffi/Cargo.toml) +version=$(awk -F\" '$1 ~ /^version/ { print $2 }' < profiling-ffi/Cargo.toml) target="$(rustc -vV | awk '/^host:/ { print $2 }')" shared_library_suffix=".so" static_library_suffix=".a" @@ -63,33 +63,45 @@ case "$target" in esac echo "Recognized platform '${target}'. Adding libs: ${native_static_libs}" -sed < ddprof_ffi.pc.in "s/@DDProf_FFI_VERSION@/${version}/g" \ - > "$destdir/lib/pkgconfig/ddprof_ffi.pc" +cd profiling-ffi +sed < datadog_profiling.pc.in "s/@Datadog_VERSION@/${version}/g" \ + > "$destdir/lib/pkgconfig/datadog_profiling.pc" -sed < ddprof_ffi_with_rpath.pc.in "s/@DDProf_FFI_VERSION@/${version}/g" \ - > "$destdir/lib/pkgconfig/ddprof_ffi_with_rpath.pc" +sed < datadog_profiling_with_rpath.pc.in "s/@Datadog_VERSION@/${version}/g" \ + > "$destdir/lib/pkgconfig/datadog_profiling_with_rpath.pc" -sed < ddprof_ffi-static.pc.in "s/@DDProf_FFI_VERSION@/${version}/g" \ - | sed "s/@DDProf_FFI_LIBRARIES@/${native_static_libs}/g" \ - > "$destdir/lib/pkgconfig/ddprof_ffi-static.pc" +sed < datadog_profiling-static.pc.in "s/@Datadog_VERSION@/${version}/g" \ + | sed "s/@Datadog_LIBRARIES@/${native_static_libs}/g" \ + > "$destdir/lib/pkgconfig/datadog_profiling-static.pc" # strip leading white space as per CMake policy CMP0004. ffi_libraries="$(echo "${native_static_libs}" | sed -e 's/^[[:space:]]*//')" -sed < cmake/DDProfConfig.cmake.in \ - > "$destdir/cmake/DDProfConfig.cmake" \ - "s/@DDProf_FFI_LIBRARIES@/${ffi_libraries}/g" +sed < ../cmake/DatadogConfig.cmake.in \ + > "$destdir/cmake/DatadogConfig.cmake" \ + "s/@Datadog_LIBRARIES@/${ffi_libraries}/g" +cd - cp -v LICENSE LICENSE-3rdparty.yml NOTICE "$destdir/" export RUSTFLAGS="${RUSTFLAGS:- -C relocation-model=pic}" -echo "Building the ddprof_ffi library (may take some time)..." -cargo build --release --target "${target}" +datadog_profiling_ffi="datadog-profiling-ffi" +echo "Building the ${datadog_profiling_ffi} crate (may take some time)..." +cargo build --package="${datadog_profiling_ffi}" --release --target "${target}" + +# Remove _ffi suffix when copying +shared_library_name="${library_prefix}datadog_profiling_ffi${shared_library_suffix}" +shared_library_rename="${library_prefix}datadog_profiling${shared_library_suffix}" + +static_library_name="${library_prefix}datadog_profiling_ffi${static_library_suffix}" +static_library_rename="${library_prefix}datadog_profiling${static_library_suffix}" -shared_library_name="${library_prefix}ddprof_ffi${shared_library_suffix}" -static_library_name="${library_prefix}ddprof_ffi${static_library_suffix}" -cp -v "target/${target}/release/$static_library_name" "target/${target}/release/$shared_library_name" "$destdir/lib/" +cp -v "target/${target}/release/${shared_library_name}" "$destdir/lib/${shared_library_rename}" +cp -v "target/${target}/release/${static_library_name}" "$destdir/lib/${static_library_rename}" + +shared_library_name="${shared_library_rename}" +static_library_name="${static_library_rename}" if [[ "$remove_rpath" -eq 1 ]]; then patchelf --remove-rpath "$destdir/lib/${shared_library_name}" @@ -112,7 +124,7 @@ if command -v objcopy > /dev/null && [[ "$target" != "x86_64-pc-windows-msvc" ]] fi echo "Checking that native-static-libs are as expected for this platform..." -cd ddprof-ffi +cd profiling-ffi actual_native_static_libs="$(cargo rustc --release --target "${target}" -- --print=native-static-libs 2>&1 | awk -F ':' '/note: native-static-libs:/ { print $3 }')" echo "Actual native-static-libs:${actual_native_static_libs}" echo "Expected native-static-libs:${expected_native_static_libs}" @@ -138,11 +150,12 @@ echo "Building tools" cargo build --package tools --bins echo "Generating $destdir/include/libdatadog headers..." -cbindgen --crate ddcommon-ffi --config ddcommon-ffi/cbindgen.toml --output "$destdir/include/datadog/common.h" -cbindgen --crate ddprof-ffi --config ddprof-ffi/cbindgen.toml --output "$destdir/include/datadog/profiling.h" +cbindgen --crate ddcommon-ffi \ + --config ddcommon-ffi/cbindgen.toml \ + --output "$destdir/include/datadog/common.h" +cbindgen --crate "${datadog_profiling_ffi}" \ + --config profiling-ffi/cbindgen.toml \ + --output "$destdir/include/datadog/profiling.h" ./target/debug/dedup_headers "$destdir/include/datadog/common.h" "$destdir/include/datadog/profiling.h" -# CI doesn't have any clang tooling -# clang-format -i "$destdir/include/ddprof/ffi.h" - echo "Done." diff --git a/cmake/DDProfConfig.cmake.in b/cmake/DDProfConfig.cmake.in deleted file mode 100644 index 2524d2aacb..0000000000 --- a/cmake/DDProfConfig.cmake.in +++ /dev/null @@ -1,41 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. -# This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc. -include(FindPackageHandleStandardArgs) - -if (DEFINED ENV{DDProf_ROOT}) - set(DDProf_ROOT "$ENV{DDProf_ROOT}") -else () - # If the environment variable is not set, maybe we are part of a build - set(DDProf_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/..") -endif () - -find_path(DDProf_INCLUDE_DIR datadog/profiling.h - HINTS ${DDProf_ROOT}/include -) - -find_library(DDProf_FFI_LIBRARY NAMES ddprof_ffi - HINTS ${DDProf_ROOT}/lib -) - -find_package_handle_standard_args(DDProf DEFAULT_MSG - DDProf_FFI_LIBRARY - DDProf_INCLUDE_DIR -) - -if (DDProf_FOUND) - set(DDProf_INCLUDE_DIRS ${DDProf_INCLUDE_DIR}) - set(DDProf_LIBRARIES ${DDProf_FFI_LIBRARY} "@DDProf_FFI_LIBRARIES@") - mark_as_advanced( - DDProf_ROOT - DDProf_FFI_LIBRARY - DDProf_INCLUDE_DIR - ) - - add_library(ddprof-ffi INTERFACE) - target_include_directories(ddprof-ffi INTERFACE ${DDProf_INCLUDE_DIRS}) - target_link_libraries(ddprof-ffi INTERFACE ${DDProf_LIBRARIES}) - target_compile_features(ddprof-ffi INTERFACE c_std_11) - add_library(DDProf::FFI ALIAS ddprof-ffi) -else () - set(DDProf_ROOT "" CACHE STRING "Directory containing libddprof") -endif () diff --git a/cmake/DatadogConfig.cmake.in b/cmake/DatadogConfig.cmake.in new file mode 100644 index 0000000000..8ffbc63342 --- /dev/null +++ b/cmake/DatadogConfig.cmake.in @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed +# under the Apache License Version 2.0. This product includes software developed +# at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc. +include(FindPackageHandleStandardArgs) + +if(DEFINED ENV{Datadog_ROOT}) + set(Datadog_ROOT "$ENV{Datadog_ROOT}") +else() + # If the environment variable is not set, maybe we are part of a build + set(Datadog_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/..") +endif() + +find_path(Datadog_INCLUDE_DIR datadog/profiling.h HINTS ${Datadog_ROOT}/include) + +find_library( + Datadog_LIBRARY + NAMES datadog_profiling + HINTS ${Datadog_ROOT}/lib) + +find_package_handle_standard_args(Datadog DEFAULT_MSG Datadog_LIBRARY + Datadog_INCLUDE_DIR) + +if(Datadog_FOUND) + set(Datadog_INCLUDE_DIRS ${Datadog_INCLUDE_DIR}) + set(Datadog_LIBRARIES ${Datadog_LIBRARY} "@Datadog_LIBRARIES@") + mark_as_advanced(Datadog_ROOT Datadog_LIBRARY Datadog_INCLUDE_DIR) + + add_library(datadog_profiling INTERFACE) + target_include_directories(datadog_profiling + INTERFACE ${Datadog_INCLUDE_DIRS}) + target_link_libraries(datadog_profiling INTERFACE ${Datadog_LIBRARIES}) + target_compile_features(datadog_profiling INTERFACE c_std_11) + + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + target_link_libraries( + datadog_profiling + INTERFACE NtDll + UserEnv + Bcrypt + crypt32 + wsock32 + ws2_32 + shlwapi + Secur32 + Ncrypt) + endif() + + add_library(Datadog::Profiling ALIAS datadog_profiling) +else() + set(Datadog_ROOT + "" + CACHE STRING "Directory containing libdatadog") +endif() diff --git a/ddcommon-ffi/Cargo.toml b/ddcommon-ffi/Cargo.toml index 9dfc698f2a..acef4ea0c9 100644 --- a/ddcommon-ffi/Cargo.toml +++ b/ddcommon-ffi/Cargo.toml @@ -3,12 +3,12 @@ [package] name = "ddcommon-ffi" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" edition = "2021" license = "Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ddcommon = { path = "../ddcommon", version = "0.7.0-rc.1" } +ddcommon = { path = "../ddcommon" } anyhow = "1.0" diff --git a/ddcommon/Cargo.toml b/ddcommon/Cargo.toml index dce19f2f47..bca51022df 100644 --- a/ddcommon/Cargo.toml +++ b/ddcommon/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" name = "ddcommon" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" [lib] crate-type = ["lib"] diff --git a/ddtelemetry/Cargo.toml b/ddtelemetry/Cargo.toml index 928ab424bc..12d08c0055 100644 --- a/ddtelemetry/Cargo.toml +++ b/ddtelemetry/Cargo.toml @@ -2,7 +2,7 @@ edition = "2021" license = "Apache 2.0" name = "ddtelemetry" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" [dependencies] anyhow = {version = "1.0"} diff --git a/examples/ffi/CMakeLists.txt b/examples/ffi/CMakeLists.txt index ce39f0253a..34573f6171 100644 --- a/examples/ffi/CMakeLists.txt +++ b/examples/ffi/CMakeLists.txt @@ -1,25 +1,16 @@ -project(ffi_examples) +project(datadog_profiling_ffi_examples LANGUAGES C CXX) cmake_minimum_required(VERSION 3.19) -find_package(DDProf) +find_package(Datadog REQUIRED) add_executable(exporter exporter.cpp) +# needed for designated initializers +target_compile_features(exporter PRIVATE cxx_std_20) +target_link_libraries(exporter PRIVATE Datadog::Profiling) -add_executable(profiles profiles.c) - -set(EXTERNAL_LIBS DDProf::FFI) - -if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - set(EXTERNAL_LIBS "${EXTERNAL_LIBS};NtDll;UserEnv;Bcrypt;crypt32;wsock32;ws2_32;shlwapi") +if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + target_compile_definitions(exporter PUBLIC _CRT_SECURE_NO_WARNINGS) endif() -if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_compile_features(exporter PRIVATE cxx_std_20) # needed for designated initializers - target_compile_definitions(exporter PUBLIC _CRT_SECURE_NO_WARNINGS) -else() - target_compile_features(exporter PRIVATE cxx_std_11) -endif() - -target_link_libraries(exporter ${EXTERNAL_LIBS}) - -target_link_libraries(profiles ${EXTERNAL_LIBS}) +add_executable(profiles profiles.c) +target_link_libraries(profiles PRIVATE Datadog::Profiling) diff --git a/examples/ffi/exporter.cpp b/examples/ffi/exporter.cpp index 10a952e92a..13e0245f1e 100644 --- a/examples/ffi/exporter.cpp +++ b/examples/ffi/exporter.cpp @@ -9,9 +9,7 @@ extern "C" { #include #include -static ddog_Slice_c_char to_slice_c_char(const char *s) { - return {.ptr = s, .len = strlen(s)}; -} +static ddog_Slice_c_char to_slice_c_char(const char *s) { return {.ptr = s, .len = strlen(s)}; } struct Deleter { void operator()(ddog_Profile *object) { ddog_Profile_free(object); } @@ -41,8 +39,7 @@ int main(int argc, char *argv[]) { const ddog_Slice_value_type sample_types = {&wall_time, 1}; const ddog_Period period = {wall_time, 60}; - std::unique_ptr profile{ - ddog_Profile_new(sample_types, &period, nullptr)}; + std::unique_ptr profile{ddog_Profile_new(sample_types, &period, nullptr)}; ddog_Line root_line = { .function = @@ -71,8 +68,7 @@ int main(int argc, char *argv[]) { }; ddog_Profile_add(profile.get(), sample); - ddog_SerializeResult serialize_result = - ddog_Profile_serialize(profile.get(), nullptr, nullptr); + ddog_SerializeResult serialize_result = ddog_Profile_serialize(profile.get(), nullptr, nullptr); if (serialize_result.tag == DDOG_SERIALIZE_RESULT_ERR) { print_error("Failed to serialize profile: ", serialize_result.err); return 1; @@ -80,8 +76,8 @@ int main(int argc, char *argv[]) { ddog_EncodedProfile *encoded_profile = &serialize_result.ok; - ddog_Endpoint endpoint = ddog_Endpoint_agentless( - DDOG_CHARSLICE_C("datad0g.com"), to_slice_c_char(api_key)); + ddog_Endpoint endpoint = + ddog_Endpoint_agentless(DDOG_CHARSLICE_C("datad0g.com"), to_slice_c_char(api_key)); ddog_Vec_tag tags = ddog_Vec_tag_new(); ddog_PushTagResult tag_result = @@ -113,12 +109,11 @@ int main(int argc, char *argv[]) { ddog_Slice_file files = {.ptr = files_, .len = sizeof files_ / sizeof *files_}; - ddog_Request *request = ddog_ProfileExporter_build( - exporter, encoded_profile->start, encoded_profile->end, files, nullptr, 30000); + ddog_Request *request = ddog_ProfileExporter_build(exporter, encoded_profile->start, + encoded_profile->end, files, nullptr, 30000); ddog_CancellationToken *cancel = ddog_CancellationToken_new(); - ddog_CancellationToken *cancel_for_background_thread = - ddog_CancellationToken_clone(cancel); + ddog_CancellationToken *cancel_for_background_thread = ddog_CancellationToken_clone(cancel); // As an example of CancellationToken usage, here we create a background // thread that sleeps for some time and then cancels a request early (e.g. diff --git a/ddprof-ffi/Cargo.toml b/profiling-ffi/Cargo.toml similarity index 70% rename from ddprof-ffi/Cargo.toml rename to profiling-ffi/Cargo.toml index e1de958ba2..ce430f0e68 100644 --- a/ddprof-ffi/Cargo.toml +++ b/profiling-ffi/Cargo.toml @@ -2,8 +2,8 @@ # This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc. [package] -name = "ddprof-ffi" -version = "0.7.0-rc.1" +name = "datadog-profiling-ffi" +version = "0.8.0-alpha.1" edition = "2021" license = "Apache-2.0" @@ -15,9 +15,9 @@ crate-type = ["staticlib", "cdylib"] [dependencies] anyhow = "1.0" chrono = "0.4" -datadog-profiling = { path = "../profiling", version = "0.7.0-rc.1" } +datadog-profiling = { path = "../profiling"} hyper = {version = "0.14", default-features = false} -ddcommon = { path = "../ddcommon", version = "0.7.0-rc.1" } -ddcommon-ffi = { path = "../ddcommon-ffi", version = "0.7.0-rc.1" } +ddcommon = { path = "../ddcommon"} +ddcommon-ffi = { path = "../ddcommon-ffi"} libc = "0.2" tokio-util = "0.7.1" diff --git a/ddprof-ffi/NOTICE b/profiling-ffi/NOTICE similarity index 100% rename from ddprof-ffi/NOTICE rename to profiling-ffi/NOTICE diff --git a/ddprof-ffi/cbindgen.toml b/profiling-ffi/cbindgen.toml similarity index 100% rename from ddprof-ffi/cbindgen.toml rename to profiling-ffi/cbindgen.toml diff --git a/ddprof_ffi-static.pc.in b/profiling-ffi/datadog_profiling-static.pc.in similarity index 80% rename from ddprof_ffi-static.pc.in rename to profiling-ffi/datadog_profiling-static.pc.in index 3f410a41ab..25acef67c6 100644 --- a/ddprof_ffi-static.pc.in +++ b/profiling-ffi/datadog_profiling-static.pc.in @@ -8,10 +8,10 @@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include -Name: ddprof_ffi +Name: datadog_profiling Description: Contains common code used to implement Datadog's Continuous Profilers. (Static linking variant) -Version: @DDProf_FFI_VERSION@ +Version: @Datadog_VERSION@ Requires: -Libs: -L${libdir} ${libdir}/libddprof_ffi.a @DDProf_FFI_LIBRARIES@ +Libs: -L${libdir} ${libdir}/libdatadog_profiling.a @Datadog_LIBRARIES@ Libs.private: Cflags: -I${includedir} diff --git a/ddprof_ffi.pc.in b/profiling-ffi/datadog_profiling.pc.in similarity index 85% rename from ddprof_ffi.pc.in rename to profiling-ffi/datadog_profiling.pc.in index 8b0024d374..8d7c132581 100644 --- a/ddprof_ffi.pc.in +++ b/profiling-ffi/datadog_profiling.pc.in @@ -8,10 +8,10 @@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include -Name: ddprof_ffi +Name: datadog_profiling Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant) -Version: @DDProf_FFI_VERSION@ +Version: @Datadog_VERSION@ Requires: -Libs: -L${libdir} -lddprof_ffi +Libs: -L${libdir} -ldatadog_profiling Libs.private: Cflags: -I${includedir} diff --git a/ddprof_ffi_with_rpath.pc.in b/profiling-ffi/datadog_profiling_with_rpath.pc.in similarity index 82% rename from ddprof_ffi_with_rpath.pc.in rename to profiling-ffi/datadog_profiling_with_rpath.pc.in index 05887f69ca..299c25e445 100644 --- a/ddprof_ffi_with_rpath.pc.in +++ b/profiling-ffi/datadog_profiling_with_rpath.pc.in @@ -8,10 +8,10 @@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include -Name: ddprof_ffi +Name: datadog_profiling Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath) -Version: @DDProf_FFI_VERSION@ +Version: @DDog_VERSION@ Requires: -Libs: -L${libdir} -lddprof_ffi -Wl,-rpath,${libdir} +Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir} Libs.private: Cflags: -I${includedir} diff --git a/ddprof-ffi/src/exporter.rs b/profiling-ffi/src/exporter.rs similarity index 100% rename from ddprof-ffi/src/exporter.rs rename to profiling-ffi/src/exporter.rs diff --git a/ddprof-ffi/src/lib.rs b/profiling-ffi/src/lib.rs similarity index 100% rename from ddprof-ffi/src/lib.rs rename to profiling-ffi/src/lib.rs diff --git a/ddprof-ffi/src/profiles.rs b/profiling-ffi/src/profiles.rs similarity index 100% rename from ddprof-ffi/src/profiles.rs rename to profiling-ffi/src/profiles.rs diff --git a/profiling/Cargo.toml b/profiling/Cargo.toml index 50214eaa6a..343a503706 100644 --- a/profiling/Cargo.toml +++ b/profiling/Cargo.toml @@ -3,13 +3,13 @@ [package] name = "datadog-profiling" -version = "0.7.0-rc.1" +version = "0.8.0-alpha.1" edition = "2021" build = "build.rs" license = "Apache-2.0" [lib] -crate-type = ["cdylib", "lib"] +crate-type = ["lib"] [build-dependencies] prost-build = "0.10" @@ -18,6 +18,7 @@ prost-build = "0.10" anyhow = "1.0" bytes = "1.1" chrono = "0.4" +ddcommon = {path = "../ddcommon"} futures = "0.3" futures-core = {version = "0.3.0", default-features = false} futures-util = {version = "0.3.0", default-features = false} @@ -32,8 +33,3 @@ percent-encoding = "2.1" prost = "0.10" tokio = {version = "1.8", features = ["rt", "macros"]} tokio-util = "0.7.1" - -ddcommon = {path = "../ddcommon"} - -[dev-dependencies] -maplit = "1.0"