Skip to content

Conversation

@jschwe
Copy link

@jschwe jschwe commented Nov 12, 2025

For users using both C/C++ and Rust, it's useful to have access to the mimalloc include directory in the build-script (of crates directly depending on libmimalloc-sys). This mechanism is also already used in crates like libz-sys, see https://github.com/rust-lang/libz-sys/blob/80c597a07f5e5f0dff0e98c03d48a77845de9f6e/build.rs#L171
This allows using the mimalloc implementation provided by this crate for both Rust and C/C++ code, without needing to vendor the mimalloc header.

See https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key for documentation.

For users using both C/C++ and Rust, it's useful to have access
to the mimalloc include directory in the build-script (of crates
directly depending on `libmimalloc-sys`). This allows using the
header in user build-scripts, without needing to vendor the mimalloc header.
This mechanism is also already used in crates like libz-sys, see
https://github.com/rust-lang/libz-sys/blob/80c597a07f5e5f0dff0e98c03d48a77845de9f6e/build.rs#L171

See <https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key>
for documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant