cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

POC: Rust Wrapper for 1DS C++ SDK

Open CDFriend opened this issue 1 year ago • 3 comments

What is this?

Adds a Rust "wrapper" to the 1DS C++ SDK, which will allow the SDK to be imported into Rust projects as a crate. The crate interacts with the C API of the SDK (instead of C++) as this will ensure a stable binary interface between the Rust layer and C++ layer of the project.

Project Structure

Crates:

  • cpp-client-telemetry-sys: crate directly exposing the C API of the 1DS SDK to Rust.
  • oneds-telemetry: contains some abstractions over the 1DS SDK and allows messages to be sent to the SDK from the log crate.
  • telemetry-sample: example executable using the oneds-telemetry crate.

Limitations

  • Currently only i64 and string telemetry fields are supported.
  • Currently we're only linking with the Windows-x64 static library - additional work on the build script will be required to add support for dynamic linking and other architectures/operating systems.

Build Instructions

  1. Follow instructions in the root of the repository to build the project in Win32-Lib configuration for the x64 arch.
  2. Run cargo build in wrappers/rust

CDFriend avatar Nov 23 '23 23:11 CDFriend

@microsoft-github-policy-service agree company="Microsoft"

CDFriend avatar Nov 23 '23 23:11 CDFriend

@CDFriend This looks to be a good addition. when you have time, can you please make it ready for review :)

lalitb avatar Jan 04 '24 20:01 lalitb

@CDFriend This looks to be a good addition. when you have time, can you please make it ready for review :)

@lalitb - I can work on resolving the feedback.

msft-tsharp avatar Jan 23 '24 06:01 msft-tsharp