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`.
This commit is contained in:
Boris-Chengbiao Zhou 2022-12-28 22:13:51 +01:00 committed by Sylvester Hesp
parent 4eb14fc218
commit 4a217f21d6

View File

@ -116,14 +116,17 @@ Now we need to add our `.cargo/config` file. This is a configuration file that
tells cargo how to build for SPIR-V. You need provide the target you're
compiling for (see [platform support](./platform-support.md)) and provide a path
to your built `rustc_codegen_spirv` dynamic library. We have to also provide
`-Zbuild-std`.
some additional options.
```toml
[build]
target = "spirv-unknown-spv1.3"
rustflags = [
"-Zcodegen-backend=<path_to_librustc_codegen_spirv>",
"-Csymbol-mangling-version=v0"
"-Zcodegen-backend=<path_to_librustc_codegen_spirv>",
"-Zbinary-dep-depinfo",
"-Csymbol-mangling-version=v0",
"-Zcrate-attr=feature(register_tool)",
"-Zcrate-attr=register_tool(rust_gpu)"
]
[unstable]