-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename ddprof-ffi crate to datadog-profiling-ffi #39
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the cleanup !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
What does this PR do?
ddprof-ffi
crate 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.