I have a use case that requires validating capabilities strings, that I would like to be able to use on non-Linux operating systems. It seems like all of the capabilities parsing / validating code ought to be platform-independent?
Currently there is no way to do this, the crate won't compile on non-Linux operating systems, and there is no way to disable the platform-specific parts.
There are a few different ways to accomplish this:
- Flag the parts of the library that are strictly Linux-specific as
#[cfg(target_os = "linux")] so that other platforms can still use the platform-independent bits.
- Split into sub-crates.
- Use a feature flag
I would be willing to file a PR myself if one of these approaches (probably the first, it seems the least painful) is acceptable.