Skip to content

Commit 4ffe5a6

Browse files
Charlie Friendmsft-tsharp
authored andcommitted
Refactor: integration oneds-telemetry with cpp-client-telemetry-sys crate
1 parent e2417f9 commit 4ffe5a6

File tree

11 files changed

+24
-329
lines changed

11 files changed

+24
-329
lines changed

wrappers/rust/cpp-client-telemetry-sys/build.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ fn write_bindings() {
5454
// bindings for.
5555
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
5656
.rust_target(bindgen::RustTarget::Stable_1_68)
57-
// .raw_line("#![allow(non_upper_case_globals)]")
58-
// .raw_line("#![allow(non_camel_case_types)]")
59-
// .raw_line("#![allow(non_snake_case)]")
60-
//.clang_arg(format!("-I{}", PathBuf::from(PROJECT_ROOT).join("lib/include").display()))
6157
.header(PathBuf::from(out_dir).join("mat.out.h").to_string_lossy())
6258
.allowlist_type("evt_.*")
6359
.allowlist_function("evt_.*")

wrappers/rust/cpp-client-telemetry-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn evt_api_call_wrapper(evt_context: Box<evt_context_t>) -> (evt_status_t, Box<e
1717
(result, out_context)
1818
}
1919

20-
pub fn evt_open(config: CString) -> Option<evt_handle_t> {
20+
pub fn evt_open(config: &CString) -> Option<evt_handle_t> {
2121
let config_bytes = config.to_bytes_with_nul().to_vec();
2222

2323
let context: Box<evt_context_t> = Box::new(evt_context_t {

wrappers/rust/cpp-client-telemetry-sys/tests/sdk_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn test_open_close() {
1919
"compat": {"customTypePrefix": "compat_event"}
2020
}"#;
2121

22-
let handle = evt_open(CString::new(config).unwrap()).expect("Failed to get SDK handle");
22+
let handle = evt_open(&CString::new(config).unwrap()).expect("Failed to get SDK handle");
2323

2424
assert_eq!(evt_close(&handle), 0);
2525
}

wrappers/rust/oneds-telemetry/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ publish = false
99
chrono = { version = "0.4.30" }
1010
log = { version = "0.4.20" }
1111
once_cell = "1.12.0"
12+
cpp-client-telemetry-sys = { path = "../cpp-client-telemetry-sys" }
1213

1314
[dev-dependencies]
1415

wrappers/rust/oneds-telemetry/build.rs

Lines changed: 0 additions & 62 deletions
This file was deleted.

wrappers/rust/oneds-telemetry/src/client_library.rs

Lines changed: 0 additions & 37 deletions
This file was deleted.

wrappers/rust/oneds-telemetry/src/helpers.rs

Lines changed: 0 additions & 46 deletions
This file was deleted.

wrappers/rust/oneds-telemetry/src/internals.rs

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)