Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parking_lot api consistent so importing from toml works seamlessly. #37

Open
0xForerunner opened this issue Nov 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@0xForerunner
Copy link

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",
] }
@bertptrs bertptrs added the enhancement New feature or request label Nov 26, 2023
@bertptrs
Copy link
Owner

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.

@0xForerunner
Copy link
Author

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants