Skip to content

Commit 754aa10

Browse files
committed
[rust] Compile winapi crate only in Windows
1 parent 54364dc commit 754aa10

File tree

2 files changed

+18
-32
lines changed

2 files changed

+18
-32
lines changed

rust/Cargo.Bazel.lock

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "94dc89c8790518c956fd52cd06689af1557f6c755c7bd1a1414719ef73ac468c",
2+
"checksum": "0a67246c8e06c7ca9247a14809232bd389b7d23c80b1c064f7bee1dc07d2f8c1",
33
"crates": {
44
"addr2line 0.21.0": {
55
"name": "addr2line",
@@ -13478,10 +13478,6 @@
1347813478
"id": "which 7.0.2",
1347913479
"target": "which"
1348013480
},
13481-
{
13482-
"id": "winapi 0.3.9",
13483-
"target": "winapi"
13484-
},
1348513481
{
1348613482
"id": "xz2 0.1.7",
1348713483
"target": "xz2"
@@ -13491,7 +13487,14 @@
1349113487
"target": "zip"
1349213488
}
1349313489
],
13494-
"selects": {}
13490+
"selects": {
13491+
"cfg(windows)": [
13492+
{
13493+
"id": "winapi 0.3.9",
13494+
"target": "winapi"
13495+
}
13496+
]
13497+
}
1349513498
},
1349613499
"deps_dev": {
1349713500
"common": [
@@ -18842,36 +18845,17 @@
1884218845
],
1884318846
"crate_features": {
1884418847
"common": [
18848+
"fileapi",
18849+
"handleapi",
18850+
"processthreadsapi",
18851+
"std",
1884518852
"sysinfoapi",
18853+
"winbase",
18854+
"winerror",
1884618855
"winnt",
1884718856
"winver"
1884818857
],
18849-
"selects": {
18850-
"aarch64-pc-windows-msvc": [
18851-
"fileapi",
18852-
"handleapi",
18853-
"processthreadsapi",
18854-
"std",
18855-
"winbase",
18856-
"winerror"
18857-
],
18858-
"i686-pc-windows-msvc": [
18859-
"fileapi",
18860-
"handleapi",
18861-
"processthreadsapi",
18862-
"std",
18863-
"winbase",
18864-
"winerror"
18865-
],
18866-
"x86_64-pc-windows-msvc": [
18867-
"fileapi",
18868-
"handleapi",
18869-
"processthreadsapi",
18870-
"std",
18871-
"winbase",
18872-
"winerror"
18873-
]
18874-
}
18858+
"selects": {}
1887518859
},
1887618860
"deps": {
1887718861
"common": [

rust/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ apple-flat-package = "0.20.0"
3838
which = "7.0.2"
3939
fs2 = "0.4.3"
4040
fs_extra = "1.3.0"
41+
42+
[target.'cfg(windows)'.dependencies]
4143
winapi = { version = "0.3.9", features = ["winver", "winnt", "sysinfoapi"] }
4244

4345
[dev-dependencies]

0 commit comments

Comments
 (0)