Skip to content

Commit d2003cc

Browse files
taegyunkimdanielsn
andauthored
[profiling] add ffi for crossbeam::ArrayQueue (#538)
* array_queue * compiles * len,is_empty,pop * fix lint * not sure whether this is right way? but builds and passes lint * pointer magic * add license * fix typo * put in ddcommon-ffi * Discard changes to profiling-ffi/cbindgen.toml * compiles * no leak * Discard changes to examples/ffi/cmake_install.cmake * Discard changes to examples/ffi/crashinfo.cpp * simple mpmsc example * update cbindgen * use while instead of dowhile * delete when error * add rest of the api * make compiler happy again * safety comments * cargo fmt * address ivo's comments * use as_inner_ref * cargo clippy * address comments * safety comment * minimal testing * push another * fix clippy * optional function pointer * resolve more comments * single thread fuzzing * run fuzzing for ddcommon-ffi * clippy fix * fix miri * Apply suggestions from code review Co-authored-by: Daniel Schwartz-Narbonne <[email protected]> * ArrayQueue * Update ddcommon-ffi/src/array_queue.rs * fix type --------- Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
1 parent d7e8fee commit d2003cc

File tree

10 files changed

+650
-1
lines changed

10 files changed

+650
-1
lines changed

.github/workflows/fuzz.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
directory: [alloc, profiling]
10+
directory: [alloc, profiling, ddcommon-ffi]
1111
env:
1212
CARGO_TERM_COLOR: always
1313
steps:

Cargo.lock

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE-3rdparty.yml

+36
Large diffs are not rendered by default.

ddcommon-ffi/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@ build_common = { path = "../build-common" }
2121
[dependencies]
2222
anyhow = "1.0"
2323
chrono = { version = "0.4.38", features = ["std"] }
24+
crossbeam-queue = "0.3.11"
2425
ddcommon = { path = "../ddcommon" }
2526
hyper = {version = "0.14", default-features = false}
27+
28+
[dev-dependencies]
29+
bolero = "0.10.1"

ddcommon-ffi/cbindgen.toml

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ rename_types = "PascalCase"
5454
[export.rename]
5555
"ParseTagsResult" = "ddog_Vec_Tag_ParseResult"
5656
"PushTagResult" = "ddog_Vec_Tag_PushResult"
57+
"ArrayQueueNewResult" = "ddog_ArrayQueue_NewResult"
58+
"ArrayQueuePushResult" = "ddog_ArrayQueue_PushResult"
59+
"ArrayQueuePopResult" = "ddog_ArrayQueue_PopResult"
60+
"ArrayQueueBoolResult" = "ddog_ArrayQueue_BoolResult"
61+
"ArrayQueueUsizeResult" = "ddog_ArrayQueue_UsizeResult"
62+
5763

5864
[enum]
5965
prefix_with_name = true

0 commit comments

Comments
 (0)