Rename ddprof-ffi crate to datadog-profiling-ffi#39
Merged
Conversation
The feature is not enabled by default and is named `datadog_profiling_ffi`. I'm not 100% sure this is actually better. cbindgen maps the feature into a C define, which requires users to set -DDATADOG_PROFILING_FFI when compiling. I've adjusted the pkg-config and cmake helpers to do this. The upside is that it's more contained, and the artifacts are named libdatadog_profiling.so instead of libdatadog_profiling_ffi.so. It's also less lines in the repo. Update licenses Format cmake files and add Secure32 on Win Also move the list of libraries that need linked into the source cmake instead of the example. Clean up ffi examples a bit
Due to a [rust bug][1], LTO was not being applied, and we need the lib crate type in order to run tests and clippy lints. For now, keep these as separate crates. [1]: rust-lang/rust#51009
15af4bd to
6c51598
Compare
nsavoire
reviewed
Aug 19, 2022
nsavoire
approved these changes
Aug 19, 2022
nsavoire
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks for the cleanup !
ivoanjo
reviewed
Aug 22, 2022
Member
There was a problem hiding this comment.
Late review, but it LGTM 👍
I'm soft-concerned about the file size increase, but will measure and report in the channel if there's any concerns separately :)
Update: I misread that the file size increase change was still left in, and actually it hasn't.
ivoanjo
added a commit
that referenced
this pull request
Jun 18, 2025
…ge strategy (#39) * Switch Ruby to use ddprof_ffi_with_rpath.pc In a previous commit I added the code to generate `ddprof_ffi_with_rpath.pc` but forgot to update the Ruby helpers to use that file. (My testing did not flag this because my initial plan was to change `ddprof_ffi.pc` directly to add the rpath flags, and the rename came late in the branch.) I will include a matching change on the dd-trace-rb side. * Package libddprof 0.5.0.rc1, including arm64 (aarch64) binaries * Exclude libddprof debug info from packaged gems * Simplify files_for helper * Actually push built arm64 gem * Change fallback package with no platform to contain all binaries See comment in `Rakefile` for details on this decision. * Update Cargo.lock for 0.5.0-rc.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
ddprof-fficrate todatadog-profiling-ffi. It renames the folder accordingly.0.8.0-alpha.1.Motivation
Before going 1.0, we wanted to do a pass on naming.
Additional Notes
Originally, this PR moved the ffi crate into the profiling crate as a feature-enabled module. Although I liked this better, the file sizes increased 50-70% because of an LTO bug in rust: rust-lang/rust#51009.
How to test the change?
The pkg-config and cmake files names changed, as did the name of the packages. Once those are fixed, upgrading should be pretty seamless.