tracing-mutex icon indicating copy to clipboard operation
tracing-mutex copied to clipboard

Make `parking_lot` api consistent so importing from `toml` works seamlessly.

Open 0xForerunner opened this issue 2 years ago • 2 comments

It would be great if the project structure was identical to parking_lot so that something like this could work without any other configuration.

parking_lot = { version = "0.3", package = "tracing-mutex", features = [
    "parking_lot",
] }

0xForerunner avatar Nov 22 '23 18:11 0xForerunner

Interesting idea. I don't think it can work with the crate as-is because it breaks composability of crate features, but I think it should be possible to create a separate crate (possibly in a workspace?) that implements this.

bertptrs avatar Nov 26 '23 13:11 bertptrs

breaks composability of crate features Ahh you're saying that this would cause conflicts when multiple features are enabled. I see how that could be a problem. Perhaps there is another solution. Maybe it's possible to import this project as normal, and then in the users crate root have something like:

#[cfg(feature = "tracing-mutex")]
pub use tracing_mutex::parking_lot;

0xForerunner avatar Nov 27 '23 19:11 0xForerunner