| 1 |
[](https://crates.io/crates/dirs-sys) |
| 2 |
[](https://docs.rs/dirs-sys/) |
| 3 |
 |
| 4 |
[](https://travis-ci.org/dirs-dev/dirs-sys-rs) |
| 5 |
[](https://ci.appveyor.com/project/soc/dirs-sys-rs/branch/master) |
| 6 |
 |
| 7 |
|
| 8 |
# `dirs-sys` |
| 9 |
|
| 10 |
System-level helper functions for the [`dirs`](https://github.com/dirs-dev/dirs-rs) |
| 11 |
and [`directories`](https://github.com/dirs-dev/directories-rs) crates. |
| 12 |
|
| 13 |
_Do not use this library directly, use [`dirs`](https://github.com/dirs-dev/dirs-rs) |
| 14 |
or [`directories`](https://github.com/dirs-dev/directories-rs)._ |
| 15 |
|
| 16 |
## Compatibility |
| 17 |
|
| 18 |
This crate only exists to facilitate code sharing between [`dirs`](https://github.com/dirs-dev/dirs-rs) |
| 19 |
and [`directories`](https://github.com/dirs-dev/directories-rs). |
| 20 |
|
| 21 |
There are no compatibility guarantees whatsoever. |
| 22 |
Functions may change or disappear without warning or any kind of deprecation period. |
| 23 |
|
| 24 |
## Platforms |
| 25 |
|
| 26 |
This library is written in Rust, and supports Linux, Redox, macOS and Windows. |
| 27 |
Other platforms are also supported; they use the Linux conventions. |
| 28 |
|
| 29 |
The minimal required version of Rust is 1.13 except for Redox, where the minimum Rust version |
| 30 |
depends on the [`redox_users`](https://crates.io/crates/redox_users) crate. |
| 31 |
|
| 32 |
## Build |
| 33 |
|
| 34 |
It's possible to cross-compile this library if the necessary toolchains are installed with rustup. |
| 35 |
This is helpful to ensure a change has not broken compilation on a different platform. |
| 36 |
|
| 37 |
The following commands will build this library on Linux, macOS and Windows: |
| 38 |
|
| 39 |
``` |
| 40 |
cargo build --target=x86_64-unknown-linux-gnu |
| 41 |
cargo build --target=x86_64-pc-windows-gnu |
| 42 |
cargo build --target=x86_64-apple-darwin |
| 43 |
cargo build --target=x86_64-unknown-redox |
| 44 |
``` |
| 45 |
|
| 46 |
## License |
| 47 |
|
| 48 |
Licensed under either of |
| 49 |
|
| 50 |
* Apache License, Version 2.0 |
| 51 |
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) |
| 52 |
* MIT license |
| 53 |
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) |
| 54 |
|
| 55 |
at your option. |
| 56 |
|
| 57 |
## Contribution |
| 58 |
|
| 59 |
Unless you explicitly state otherwise, any contribution intentionally submitted |
| 60 |
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be |
| 61 |
dual licensed as above, without any additional terms or conditions. |