Skip to content

Commit 5b8c55c

Browse files
authored
Build for WASM on docs.rs (#3462)
1 parent 4593f95 commit 5b8c55c

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

wgpu-core/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ license = "MIT OR Apache-2.0"
1212
[package.metadata.docs.rs]
1313
all-features = true
1414
rustdoc-args = ["--cfg", "docsrs"]
15+
targets = [
16+
"x86_64-unknown-linux-gnu",
17+
"x86_64-apple-darwin",
18+
"x86_64-pc-windows-msvc",
19+
"wasm32-unknown-unknown",
20+
]
1521

1622
[lib]
1723

wgpu-hal/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ rust-version = "1.60"
2323
# with the dx11 and dx12 features.
2424
features = ["vulkan", "gles", "renderdoc"]
2525
rustdoc-args = ["--cfg", "docsrs"]
26+
targets = [
27+
"x86_64-unknown-linux-gnu",
28+
"x86_64-apple-darwin",
29+
"x86_64-pc-windows-msvc",
30+
"wasm32-unknown-unknown",
31+
]
2632

2733
[lib]
2834

wgpu-types/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ license = "MIT OR Apache-2.0"
1212
[package.metadata.docs.rs]
1313
all-features = true
1414
rustdoc-args = ["--cfg", "docsrs"]
15+
targets = [
16+
"x86_64-unknown-linux-gnu",
17+
"x86_64-apple-darwin",
18+
"x86_64-pc-windows-msvc",
19+
"wasm32-unknown-unknown",
20+
]
1521

1622
[lib]
1723

wgpu/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ autotests = false
2424
[package.metadata.docs.rs]
2525
all-features = true
2626
rustdoc-args = ["--cfg", "docsrs"]
27+
targets = [
28+
"x86_64-unknown-linux-gnu",
29+
"x86_64-apple-darwin",
30+
"x86_64-pc-windows-msvc",
31+
"wasm32-unknown-unknown",
32+
]
2733

2834
[lib]
2935

0 commit comments

Comments
 (0)