Skip to content

Commit 5e397eb

Browse files
authored
Merge pull request #29 from sp3d/master
Make Windows deps target-conditional
2 parents 8439f76 + 6a56384 commit 5e397eb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ exclude = [
2222
]
2323

2424
[dependencies]
25-
kernel32-sys = "0.2"
2625
libc = "0.2"
26+
27+
[target.'cfg(windows)'.dependencies]
28+
kernel32-sys = "0.2"
2729
winapi = "0.2"
2830

2931
[build-dependencies]

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
//! and thus the building blocks for higher-level abstractions, like coroutines,
1313
//! cooperative threads (userland threads) or an equivalent to the C# keyword "yield".
1414
15-
extern crate kernel32;
1615
extern crate libc;
16+
#[cfg(windows)]
17+
extern crate kernel32;
18+
#[cfg(windows)]
1719
extern crate winapi;
1820

1921
/// Provides the `Context` and `Transfer` types for

0 commit comments

Comments
 (0)