Skip to content

Conversation

@jschwe
Copy link
Contributor

@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.
@jschwe
Copy link
Contributor Author

jschwe commented Nov 21, 2025

@octavonce Friendly ping, any chance you could take a look at this PR?

@octavonce
Copy link
Collaborator

This is great

@octavonce octavonce merged commit 7daf67f into purpleprotocol:master Nov 24, 2025
5 checks passed
@jschwe jschwe deleted the add_dep_var_support branch November 24, 2025 16:08
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.

2 participants