Skip to content

Commit 3eb6bb5

Browse files
committed
update links
1 parent 193d008 commit 3eb6bb5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/src/introduction.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ how to use and develop on Rust-GPU.
2222

2323
1. Install [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools#downloads) and add it to your PATH (for now, eventually we will automatically build and link it instead of calling executables)
2424

25-
1. Next, look at the [examples](examples) folder. There are two projects here: [examples/example-shader](examples/example-shader) and [examples/example-runner](examples/example-runner). The example-shader project is a "GPU crate", one that will be compiled to a SPIR-V module. The example-runner project is a normal, CPU crate that uses vulkan to consume the example-shader SPIR-V module to display a shader.
25+
1. Next, look at the [examples] folder. There are two projects here: [examples/example-shader] and [examples/example-runner]. The example-shader project is a "GPU crate", one that will be compiled to a SPIR-V module. The example-runner project is a normal, CPU crate that uses vulkan to consume the example-shader SPIR-V module to display a shader.
2626

2727
Run the example:
2828

@@ -32,10 +32,11 @@ how to use and develop on Rust-GPU.
3232

3333
This will build `rustc_codegen_spirv`, the compiler, then use that compiler to build `example-shader` into a SPIR-V module, then finally, build a vulkan sample app (taken from [ash's examples](https://github.com/MaikKlein/ash/blob/master/examples/src/bin/triangle.rs)) using the built SPIR-V module to display the shader in a window.
3434
35-
All of this is orchestrated by the [spirv-builder](spirv-builder) crate, which is used in example-runner's `build.rs` file. Please look at that file, as well as both example projects in general, to see how to set up your own shaders!
35+
All of this is orchestrated by the [spirv-builder] crate, which is used in example-runner's `build.rs` file. Please look at that file, as well as both example projects in general, to see how to set up your own shaders!
3636

3737
Be aware that this project is in a very early phase - if the above doesn't work, please [file an issue](https://github.com/EmbarkStudios/rust-gpu/issues)!
3838
39+
3940
## Getting started, for power users who don't want to use spirv-builder.
4041

4142
If you would like to build the compiler, `rustc_codegen_spirv` is the relevant folder. Install the prerequisites, as above, then, `cd rustc_codegen_spirv && cargo build`. This produces an .so file, located at `./target/debug/librustc_codegen_spirv.so` (or `.dll`/`.dylib` depending on your platform).
@@ -57,7 +58,11 @@ cargo build -Z build-std=core --target spirv-unknown-unknown --release
5758
5859
This will produce a `target/spirv-unknown-unknown/release/crate_name.spv` file.
5960
60-
To create a GPU crate, look at the [examples/example-shader](examples/example-shader) crate. In short, reference the `spirv-std` crate, and use intrinsics defined there to create your shader.
61+
To create a GPU crate, look at the [examples/example-shader] crate. In short, reference the `spirv-std` crate, and use intrinsics defined there to create your shader.
6162
62-
This is all a little convoluted, hence the [spirv-builder](spirv-builder) crate handles a lot of this.
63+
This is all a little convoluted, hence the [spirv-builder] crate handles a lot of this.
6364
65+
[examples]: https://github.com/EmbarkStudios/rust-gpu/blob/main/examples
66+
[examples/example-shader]: https://github.com/EmbarkStudios/rust-gpu/blob/main/examples/example-shader
67+
[examples/example-runner]: https://github.com/EmbarkStudios/rust-gpu/blob/main/examples/example-shader
68+
[spirv-builder]: https://github.com/EmbarkStudios/rust-gpu/blob/main/crates/spirv-builder

0 commit comments

Comments
 (0)