Skip to content

Commit 96c6fbf

Browse files
committed
add uwp feature
1 parent 82757d1 commit 96c6fbf

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ stdweb = { version = "0.4.18", optional = true }
3030

3131
[features]
3232
std = []
33+
# enables support for UWP targets, bumps MSRV to Rust 1.33
34+
uwp = []

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ install:
3636
build: false
3737

3838
test_script:
39-
- cargo test
40-
- cargo test --examples
39+
- cargo test --features=uwp
40+
- cargo test --examples --features=uwp

src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,7 @@ cfg_if! {
224224
#[path = "solaris_illumos.rs"] mod imp;
225225
} else if #[cfg(target_os = "wasi")] {
226226
#[path = "wasi.rs"] mod imp;
227-
} else if #[cfg(any(
228-
// target_vendor was stabilized only in Rust 1.33
229-
target = "i686-uwp-windows-gnu",
230-
target = "x86_64-uwp-windows-gnu",
231-
target = "aarch64-uwp-windows-msvc",
232-
target = "x86_64-uwp-windows-msvc",
233-
target = "i686-uwp-windows-msvc",
234-
))] {
227+
} else if #[cfg(all(feature = "uwp", target_vendor = "uwp"))] {
235228
#[path = "windows_uwp.rs"] mod imp;
236229
} else if #[cfg(windows)] {
237230
#[path = "windows.rs"] mod imp;

0 commit comments

Comments
 (0)