From ea8b4c761ed663a2b2194b4ae2567723b62ec350 Mon Sep 17 00:00:00 2001 From: Daniel Schwartz-Narbonne Date: Tue, 6 Aug 2024 15:16:49 -0400 Subject: [PATCH 1/2] [crashtracker] Build static binary --- crashtracker/src/bin/crashtracker_receiver.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crashtracker/src/bin/crashtracker_receiver.rs diff --git a/crashtracker/src/bin/crashtracker_receiver.rs b/crashtracker/src/bin/crashtracker_receiver.rs new file mode 100644 index 0000000000..cc1b8edffb --- /dev/null +++ b/crashtracker/src/bin/crashtracker_receiver.rs @@ -0,0 +1,10 @@ +// Copyright 2023-Present Datadog, Inc. https://www.datadoghq.com/ +// SPDX-License-Identifier: Apache-2.0 + +#[cfg(not(unix))] +fn main() {} + +#[cfg(unix)] +fn main() -> anyhow::Result<()> { + datadog_crashtracker::receiver_entry_point_stdin() +} From a2103c2002e4e33d5294cfbc99da6ec54fe9668d Mon Sep 17 00:00:00 2001 From: Daniel Schwartz-Narbonne Date: Tue, 6 Aug 2024 16:21:12 -0400 Subject: [PATCH 2/2] explicit bin section in the cargo.toml --- crashtracker/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crashtracker/Cargo.toml b/crashtracker/Cargo.toml index 248c9a8d39..d6ff7e2d35 100644 --- a/crashtracker/Cargo.toml +++ b/crashtracker/Cargo.toml @@ -11,6 +11,11 @@ license.workspace = true crate-type = ["lib"] bench = false +[[bin]] +name = "crashtracker-receiver" +path = "src/bin/crashtracker_receiver.rs" +bench = false + [features] default = ["collector", "receiver"] # Enables the in-process collection of crash-info