Skip to content

Commit 7e809e4

Browse files
authored
chore: move memfd config to datadog-library-config (#1072)
# What does this PR do? Move shared in-memory tracer configuration from `ddcommon` to `datadog-library-config`. # Motivation It's better suited than `ddcommon`.
1 parent 0a4a372 commit 7e809e4

File tree

10 files changed

+21
-18
lines changed

10 files changed

+21
-18
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datadog-library-config-ffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[package]
55
name = "datadog-library-config-ffi"
6-
version = "0.0.1"
6+
version = "0.0.2"
77
edition = "2021"
88

99
[lib]

datadog-library-config-ffi/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
22
// SPDX-License-Identifier: Apache-2.0
33

4+
pub mod tracer_metadata;
5+
46
use datadog_library_config::{self as lib_config, LibraryConfigSource};
57
use ddcommon_ffi::{self as ffi, slice::AsBytes, CharSlice};
68

ddcommon-ffi/src/tracer_metadata.rs renamed to datadog-library-config-ffi/src/tracer_metadata.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// Copyright 2023-Present Datadog, Inc. https://www.datadoghq.com/
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::slice::CharSlice;
5-
use crate::Result;
64
#[cfg(target_os = "linux")]
7-
use ddcommon::tracer_metadata::AnonymousFileHandle;
8-
use ddcommon::tracer_metadata::{self, TracerMetadata};
5+
use datadog_library_config::tracer_metadata::AnonymousFileHandle;
6+
use datadog_library_config::tracer_metadata::{self, TracerMetadata};
7+
use ddcommon_ffi::{CharSlice, Result};
98
use std::os::raw::c_int;
109

1110
/// C-compatible representation of an anonymous file handle

datadog-library-config/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[package]
55
name = "datadog-library-config"
6-
version = "0.0.1"
6+
version = "0.0.2"
77
edition = "2021"
88

99
[lib]
@@ -15,5 +15,12 @@ serde = { version = "1.0", features = ["derive"] }
1515
serde_yaml = "0.9.34"
1616
anyhow = "1.0"
1717

18+
rand = "0.8.3"
19+
rmp = "0.8.14"
20+
rmp-serde = "1.3.0"
21+
1822
[dev-dependencies]
1923
tempfile = { version = "3.3" }
24+
25+
[target.'cfg(unix)'.dependencies]
26+
memfd = { version = "0.6" }

datadog-library-config/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
22
// SPDX-License-Identifier: Apache-2.0
3+
pub mod tracer_metadata;
34

45
use std::borrow::Cow;
56
use std::cell::OnceCell;
File renamed without changes.

ddcommon-ffi/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pub mod slice_mut;
1919
pub mod string;
2020
pub mod tags;
2121
pub mod timespec;
22-
pub mod tracer_metadata;
2322
pub mod utils;
2423
pub mod vec;
2524

ddcommon/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ tower-service = "0.3"
3131
cc = "1.1.31"
3232
log = { version = "0.4" }
3333
pin-project = "1"
34-
rand = "0.8.3"
3534
regex = "1.5"
36-
rmp = "0.8.14"
37-
rmp-serde = "1.3.0"
3835
rustls = { version = "0.23", default-features = false, optional = true }
3936
rustls-native-certs = { version = "0.8.1", optional = true }
4037
tokio = { version = "1.23", features = ["rt", "macros"] }
@@ -55,7 +52,6 @@ hyper-rustls = { version = "0.27", default-features = false, features = [
5552
"tls12",
5653
"aws-lc-rs",
5754
], optional = true }
58-
memfd = { version = "0.6" }
5955

6056
[target.'cfg(not(unix))'.dependencies]
6157
hyper-rustls = { version = "0.27", default-features = false, features = [

ddcommon/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub mod config;
2424
pub mod hyper_migration;
2525
pub mod rate_limiter;
2626
pub mod tag;
27-
pub mod tracer_metadata;
2827
pub mod unix_utils;
2928

3029
/// Extension trait for `Mutex` to provide a method that acquires a lock, panicking if the lock is

0 commit comments

Comments
 (0)