kawamuray / linux-taskstats-rs

Rust interface for Linux taskstats
MIT License
9 stars 7 forks source link

Use feature control to allow using the library without the binary dependencies #4

Closed alexmaco closed 2 years ago

alexmaco commented 2 years ago

When using the library, it is now possible for users to use default-features = false and code for the binary and its dependencies will not be included downstream.

The module format is now public because it is used in the binary, but its tests also require model, which is private to the lib.

An alternative to this approach would be to have no features enabled by default, in which case instead of cargo run, one must write cargo run --features=executable.

kawamuray commented 2 years ago

LGTM, thanks!