Skip to content

Make platform-indepentent parts of the crate usable on non-Linux platforms #5

@dralley

Description

@dralley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions