From 77dd01ef28d7870e4d3a109b30b3dd701abdf61b Mon Sep 17 00:00:00 2001 From: Maxence Younsi Date: Tue, 27 Feb 2024 11:19:28 +0100 Subject: [PATCH] generic enum tags PR to track https://github.com/mozilla/cbindgen/pull/785 forks https://github.com/mxyns/cbindgen/tree/merge-generic-tags https://github.com/mxyns/cargo-c --- README.md | 1 + crates/pmacct-gauze-lib/cbindgen.toml.template | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f3d0b64..81d86a4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This is still very experimental. The fork of pmacct with the pmacct-gauze integr ### Prerequisites - working Rust and C environments - [cargo-c](https://crates.io/crates/cargo-c) + - install my fork `cargo install --git https://github.com/mxyns/cargo-c cargo-c` until this [PR](https://github.com/mozilla/cbindgen/pull/785) has been merged - pmacct headers installed (see [install script](tools/install_pmacct_headers.sh)) - or use the `PMACCT_INCLUDE_DIR` env variable to set the location of the headers but be careful of cyclic dependencies. - the following file tree structure diff --git a/crates/pmacct-gauze-lib/cbindgen.toml.template b/crates/pmacct-gauze-lib/cbindgen.toml.template index dc5ba5b..5740622 100644 --- a/crates/pmacct-gauze-lib/cbindgen.toml.template +++ b/crates/pmacct-gauze-lib/cbindgen.toml.template @@ -15,4 +15,6 @@ expand = ["pmacct-gauze-lib"] "bridge" = "pmacct-gauze-bindings" [enum] -prefix_with_name = true \ No newline at end of file +prefix_with_name = true +# This requires the fork cargo-c https://github.com/mxyns/cargo-c +merge_generic_tags = true \ No newline at end of file