Skip to content

Commit 4a217f2

Browse files
Bobo1239oisyn
authored andcommitted
Update docs for manual shader crate building
Add some additional flags based on crates/spirv-builder/src/lib.rs which weren't updated here yet. (causing compilation errors) Also update the wording so it doesn't seem like the user is supposed to call `cargo -Zbuild-std`.
1 parent 4eb14fc commit 4a217f2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/src/writing-shader-crates.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,17 @@ Now we need to add our `.cargo/config` file. This is a configuration file that
116116
tells cargo how to build for SPIR-V. You need provide the target you're
117117
compiling for (see [platform support](./platform-support.md)) and provide a path
118118
to your built `rustc_codegen_spirv` dynamic library. We have to also provide
119-
`-Zbuild-std`.
119+
some additional options.
120120

121121
```toml
122122
[build]
123123
target = "spirv-unknown-spv1.3"
124124
rustflags = [
125-
"-Zcodegen-backend=<path_to_librustc_codegen_spirv>",
126-
"-Csymbol-mangling-version=v0"
125+
"-Zcodegen-backend=<path_to_librustc_codegen_spirv>",
126+
"-Zbinary-dep-depinfo",
127+
"-Csymbol-mangling-version=v0",
128+
"-Zcrate-attr=feature(register_tool)",
129+
"-Zcrate-attr=register_tool(rust_gpu)"
127130
]
128131

129132
[unstable]

0 commit comments

Comments
 (0)