Skip to content
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

[PROF-10241] Extract libdatadog crashtracker telemetry into separate extension #3824

Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tiny doc explaining how to build on macOS
  • Loading branch information
ivoanjo committed Aug 2, 2024
commit b7dc64dfd621f6dcb0531949c56503dc4297fbe7
26 changes: 26 additions & 0 deletions ext/libdatadog_api/macos_development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Developing on macOS

As of this writing (August 2024), the libdatadog builds on rubygems.org only support Linux.

We don't officially support using libdatadog for Ruby on other platforms yet, but it is possible to use it for local development on macOS.
(**Note that you don't need these instructions if you develop inside docker.**)

Here's how you can do so:

1. [Install rust](https://www.rust-lang.org/tools/install)
2. Install `cbindgen`: `cargo install cbindgen`
3. Clone [libdatadog](https://github.com/datadog/libdatadog)
4. Create a folder for building into based on your ruby platform:

```
export DD_RUBY_PLATFORM=`ruby -e 'puts Gem::Platform.local.to_s'`
mkdir -p my-libdatadog-build/$DD_RUBY_PLATFORM
```

5. Build libdatadog into this folder: `./build-profiling-ffi.sh my-libdatadog-build/$DD_RUBY_PLATFORM`
6. Tell the Ruby where to find libdatadog: `export LIBDATADOG_VENDOR_OVERRIDE=/full/path/to/my-libdatadog-build/` (Notice no platform here)
7. Run `bundle exec rake clean compile`

If you additionally want to run the profiler test suite, also remember to `export DD_PROFILING_MACOS_TESTING=true` and re-run `rake clean compile`.

These instructions can quickly get outdated, so feel free to open an issue if they're not working (and/or ping @ivoanjo).