-
Notifications
You must be signed in to change notification settings - Fork 10
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
[FEATURE] Build system handles different feature configurations #353
Comments
The approach I have been taking in Python is build the Rust FFI/wrappers in the dd-trace-py repo. The goal being I want to be able to pull in specific crates only in our own Cargo.toml instead of worrying about downloading binaries/artifacts. I've seen the benefit a lot as being able to pick and choose only what I need, as well as building the rust extensions on the same systems that we are building the library on this way we don't have to try and duplicate build environments (os/arch/etc) across multiple repos. I think this approach should work for most languages. Do you think this is a viable path to achieve the same goals you have? Or are we always going to have to build the FFI/binaries for libdatadog anyways? https://github.com/DataDog/dd-trace-py/tree/f60060dbed3841244abead9008ff04eb804461af/src/core |
Rebuilding from source has some real benefits. I know PHP have chosen this path. If you are OK with having a Rust toolchain and build times are acceptable, I think this is fine. Ideally we would document the chosen path (I tried having a RFC, looks like it should evolve per language) and ensure we share practices across a given language. In the end you still need the feature per feature setting, and you still need the libdatadog CI to test your feature configuration (to avoid having broken feature combinations when folks merge within libdatadog). So it feels like the issue is also relevant to Python. |
Description
When building libraries in libdatadog, we want to ensure that it is easy to add in or remove modules.
Any logics associated to a module should be within the associated folder.
This means that shell scripts with embedded build logics should be removed.
Example of logics to migrate
https://github.com/DataDog/libdatadog/blob/main/build-telemetry-ffi.sh
https://github.com/DataDog/libdatadog/blob/main/build-profiling-ffi.sh
Package config generation:
https://github.com/DataDog/libdatadog/blob/main/profiling-ffi/datadog_profiling.pc.in
Associated FFI examples:
https://github.com/DataDog/libdatadog/tree/main/examples/ffi
Describe the goal of the feature
The goal of the feature is to be able to do:
Which would produce the expected deliverable.
The associated test commands should work.
Describe alternatives you've considered
We can review the RFC.
The aim is to have a single build for Rust features.
Additional context
As we are looking to add tracing features in the build, we want a clean build system.
The text was updated successfully, but these errors were encountered: