Skip to content

Commit

Permalink
Deploying to gh-pages from @ e54dd75 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LegNeato committed Jul 18, 2024
1 parent 75ed194 commit a1541ae
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 45 deletions.
10 changes: 5 additions & 5 deletions api/rustc_codegen_spirv/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
unstable and mainly intended for developing on the project itself. This is
the API documentation for <code>rustc_codegen_spirv</code> which is not that useful on
its own. You might also be interested in the following crates. There’s also
the <a href="https://embarkstudios.github.io/rust-gpu/book">Rust GPU Dev Guide</a> which contains more user-level
the <a href="https://rust-gpu.github.io/rust-gpu/book">Rust GPU Dev Guide</a> which contains more user-level
information on how to use and setup <code>rust-gpu</code>.</p>
<ul>
<li><a href="https://embarkstudios.github.io/rust-gpu/api/spirv_builder"><code>spirv-builder</code></a></li>
<li><a href="https://embarkstudios.github.io/rust-gpu/api/spirv_std"><code>spirv-std</code></a></li>
<li><a href="https://embarkstudios.github.io/rust-gpu/api/spirv_tools"><code>spirv-tools</code></a></li>
<li><a href="https://embarkstudios.github.io/rust-gpu/api/spirv_tools_sys"><code>spirv-tools-sys</code></a></li>
<li><a href="https://rust-gpu.github.io/rust-gpu/api/spirv_builder"><code>spirv-builder</code></a></li>
<li><a href="https://rust-gpu.github.io/rust-gpu/api/spirv_std"><code>spirv-std</code></a></li>
<li><a href="https://rust-gpu.github.io/rust-gpu/api/spirv_tools"><code>spirv-tools</code></a></li>
<li><a href="https://rust-gpu.github.io/rust-gpu/api/spirv_tools_sys"><code>spirv-tools-sys</code></a></li>
</ul>
</div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.__rustc_codegen_backend.html" title="fn rustc_codegen_spirv::__rustc_codegen_backend">__rustc_codegen_backend</a></div><div class="desc docblock-short">This is the entrypoint for a hot plugged <code>rustc_codegen_spirv</code></div></li></ul></section></div></main></body></html>
4 changes: 2 additions & 2 deletions api/spirv_builder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- markdownlint-disable-file MD033 -->
<h2 id="spirv-builder"><a href="#spirv-builder"><code>spirv-builder</code></a></h2>
<p><img src="https://img.shields.io/badge/rust-nightly--2023--05--27-purple.svg" alt="Rust version" /></p>
<p>This crate gives you <code>SpirvBuilder</code>, a tool to build shaders using <a href="https://github.com/EmbarkStudios/rust-gpu/">rust-gpu</a>.</p>
<p>This crate gives you <code>SpirvBuilder</code>, a tool to build shaders using <a href="https://github.com/rust-gpu/rust-gpu/">rust-gpu</a>.</p>
<p>It takes care of pulling in the <code>SPIR-V</code> backend for Rust, <code>rustc_codegen_spirv</code>, and invoking a nested build using appropriate compiler options, some of which may be set using the <code>SpirvBuilder</code> API.</p>
<h3 id="example"><a href="#example">Example</a></h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>spirv_builder::{MetadataPrintout, SpirvBuilder};
Expand All @@ -19,7 +19,7 @@ <h3 id="example"><a href="#example">Example</a></h3>
<h3 id="building-with-spirv-builder"><a href="#building-with-spirv-builder">Building with <code>spirv-builder</code></a></h3>
<p>As <code>spirv-builder</code> relies on <code>rustc_codegen_spirv</code> being built for it (by Cargo, as a direct dependency), and due to the special nature of the latter (as a <code>rustc</code> codegen backend “plugin”), both end up sharing the requirement for a very specific nightly toolchain version of Rust.</p>
<p><strong>The current Rust toolchain version is: <code>nightly-2023-05-27</code>.</strong></p>
<p>Rust toolchain version history across <a href="https://github.com/EmbarkStudios/rust-gpu/releases">rust-gpu releases</a> (since <code>0.4</code>):</p>
<p>Rust toolchain version history across <a href="https://github.com/rust-gpu/rust-gpu/releases">rust-gpu releases</a> (since <code>0.4</code>):</p>
<div><table><thead><tr><th style="text-align: center"><code>spirv-builder</code><br>version</th><th style="text-align: center">Rust toolchain<br>version</th></tr></thead><tbody>
<tr><td style="text-align: center"><code>0.9</code></td><td style="text-align: center"><code>nightly-2023-05-27</code></td></tr>
<tr><td style="text-align: center"><code>0.8</code></td><td style="text-align: center"><code>nightly-2023-04-15</code></td></tr>
Expand Down
8 changes: 4 additions & 4 deletions api/spirv_std/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="`spirv-std`"><title>spirv_std - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="spirv_std" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0-nightly (8ce4540bd 2023-09-29)" data-channel="nightly" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../spirv_std/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../spirv_std/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate spirv_std</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.9.0</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#attributes">Attribute Macros</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">spirv_std</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/spirv_std/lib.rs.html#1-149">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="spirv-std"><a href="#spirv-std"><code>spirv-std</code></a></h2>
<p>Core functions, traits, and more that make up a “standard library” for SPIR-V for use in <a href="https://github.com/EmbarkStudios/rust-gpu#readme">rust-gpu</a>.</p>
<p>Core functions, traits, and more that make up a “standard library” for SPIR-V for use in <a href="https://github.com/rust-gpu/rust-gpu#readme">rust-gpu</a>.</p>
<p>This crate gives a <code>rust-gpu</code> shader access to the required <code>#![spirv(..)]</code> attribute, as well as povide all kinds of APIs that allows a shader to access GPU resources such as textures and buffers. Optionally, through the use of the <code>&quot;glam&quot;</code> feature, it includes some boilerplate trait implementations to make <code>glam</code> vector types compatible with these APIs.</p>
<h3 id="example"><a href="#example">Example</a></h3>
<p><img src="https://github.com/EmbarkStudios/rust-gpu/raw/b12a2f3f6a54bc841d05a9224bc577909d519228/docs/assets/sky.jpg" alt="Sky shader" /></p>
<p>Here is a small excerpt to see what a shader would look like. See <a href="https://github.com/EmbarkStudios/rust-gpu/blob/69cb69d28f1e64420ee31ade5e7dffb7c5621e89/examples/shaders/sky-shader/src/lib.rs">source</a> for full details of the shader that generates above image.</p>
<p><img src="https://github.com/rust-gpu/rust-gpu/raw/b12a2f3f6a54bc841d05a9224bc577909d519228/docs/assets/sky.jpg" alt="Sky shader" /></p>
<p>Here is a small excerpt to see what a shader would look like. See <a href="https://github.com/rust-gpu/rust-gpu/blob/69cb69d28f1e64420ee31ade5e7dffb7c5621e89/examples/shaders/sky-shader/src/lib.rs">source</a> for full details of the shader that generates above image.</p>

<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>spirv_std::spirv;
<span class="kw">use </span>glam::{Vec3, Vec4, vec2, vec3};
Expand All @@ -29,7 +29,7 @@ <h3 id="example"><a href="#example">Example</a></h3>
<span class="kw-2">*</span>output = tonemap(color).extend(<span class="number">1.0</span>)
}</code></pre></div>
<h3 id="getting-started"><a href="#getting-started">Getting started</a></h3>
<p>Check out <a href="https://embarkstudios.github.io/rust-gpu/book/">The <code>rust-gpu</code> Dev Guide</a> for information on how to get started with using it in your projects.</p>
<p>Check out <a href="https://rust-gpu.github.io/rust-gpu/book/">The <code>rust-gpu</code> Dev Guide</a> for information on how to get started with using it in your projects.</p>
<p>Experiment with rust-gpu shaders in-browser at <a href="https://shadered.org/shaders?language=rust&amp;sort=hot">SHADERed</a>.</p>
</div></details><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2><ul class="item-table"><li><div class="item-name"><code>pub extern crate <a class="mod" href="../spirv_std_macros/index.html" title="mod spirv_std_macros">spirv_std_macros</a> as macros;</code></div></li><li><div class="item-name" id="reexport.ByteAddressableBuffer"><code>pub use byte_addressable_buffer::<a class="struct" href="byte_addressable_buffer/struct.ByteAddressableBuffer.html" title="struct spirv_std::byte_addressable_buffer::ByteAddressableBuffer">ByteAddressableBuffer</a>;</code></div></li><li><div class="item-name" id="reexport.num_traits"><code>pub use <a class="mod" href="../num_traits/index.html" title="mod num_traits">num_traits</a>;</code></div></li><li><div class="item-name" id="reexport.glam"><code>pub use <a class="mod" href="../glam/index.html" title="mod glam">glam</a>;</code></div></li></ul><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="arch/index.html" title="mod spirv_std::arch">arch</a></div><div class="desc docblock-short">SPIR-V Instrinics</div></li><li><div class="item-name"><a class="mod" href="byte_addressable_buffer/index.html" title="mod spirv_std::byte_addressable_buffer">byte_addressable_buffer</a></div><div class="desc docblock-short">Container for an untyped blob of data.</div></li><li><div class="item-name"><a class="mod" href="float/index.html" title="mod spirv_std::float">float</a></div><div class="desc docblock-short">Traits and helper functions related to floats.</div></li><li><div class="item-name"><a class="mod" href="image/index.html" title="mod spirv_std::image">image</a></div><div class="desc docblock-short">Image types</div></li><li><div class="item-name"><a class="mod" href="integer/index.html" title="mod spirv_std::integer">integer</a></div><div class="desc docblock-short">Traits related to integers.</div></li><li><div class="item-name"><a class="mod" href="memory/index.html" title="mod spirv_std::memory">memory</a></div><div class="desc docblock-short">Types for handling memory ordering constraints for concurrent memory access.</div></li><li><div class="item-name"><a class="mod" href="number/index.html" title="mod spirv_std::number">number</a></div><div class="desc docblock-short">Traits and helper functions related to numbers.</div></li><li><div class="item-name"><a class="mod" href="ray_tracing/index.html" title="mod spirv_std::ray_tracing">ray_tracing</a></div><div class="desc docblock-short">Ray-tracing data types</div></li><li><div class="item-name"><a class="mod" href="scalar/index.html" title="mod spirv_std::scalar">scalar</a></div><div class="desc docblock-short">Traits related to scalars.</div></li><li><div class="item-name"><a class="mod" href="vector/index.html" title="mod spirv_std::vector">vector</a></div><div class="desc docblock-short">Traits related to vectors.</div></li></ul><h2 id="macros" class="small-section-header"><a href="#macros">Macros</a></h2><ul class="item-table"><li><div class="item-name"><a class="macro" href="macro.Image.html" title="macro spirv_std::Image">Image</a></div><div class="desc docblock-short">A macro for creating SPIR-V <code>OpTypeImage</code> types. Always produces a
<code>spirv_std::image::Image&lt;...&gt;</code> type.</div></li><li><div class="item-name"><a class="macro" href="macro.ray_query.html" title="macro spirv_std::ray_query">ray_query</a></div><div class="desc docblock-short">Constructs an uninitialized ray query variable. Using the syntax
Expand Down
12 changes: 6 additions & 6 deletions api/src/rustc_codegen_spirv/lib.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,11 @@
//! - [`spirv-tools`]
//! - [`spirv-tools-sys`]
//!
//! [gpu-dev-guide]: https://embarkstudios.github.io/rust-gpu/book
//! [`spirv-builder`]: https://embarkstudios.github.io/rust-gpu/api/spirv_builder
//! [`spirv-std`]: https://embarkstudios.github.io/rust-gpu/api/spirv_std
//! [`spirv-tools`]: https://embarkstudios.github.io/rust-gpu/api/spirv_tools
//! [`spirv-tools-sys`]: https://embarkstudios.github.io/rust-gpu/api/spirv_tools_sys
//! [gpu-dev-guide]: https://rust-gpu.github.io/rust-gpu/book
//! [`spirv-builder`]: https://rust-gpu.github.io/rust-gpu/api/spirv_builder
//! [`spirv-std`]: https://rust-gpu.github.io/rust-gpu/api/spirv_std
//! [`spirv-tools`]: https://rust-gpu.github.io/rust-gpu/api/spirv_tools
//! [`spirv-tools-sys`]: https://rust-gpu.github.io/rust-gpu/api/spirv_tools_sys
</span><span class="attr">#![feature(rustc_private)]
#![feature(array_methods)]
#![feature(assert_matches)]
Expand Down Expand Up @@ -1010,7 +1010,7 @@
</span><span class="kw">pub fn </span>__rustc_codegen_backend() -&gt; Box&lt;<span class="kw">dyn </span>CodegenBackend&gt; {
<span class="comment">// Tweak rustc&#39;s default ICE panic hook, to direct people to `rust-gpu`.
</span>rustc_driver::install_ice_hook(
<span class="string">&quot;https://github.com/EmbarkStudios/rust-gpu/issues/new&quot;</span>,
<span class="string">&quot;https://github.com/rust-gpu/rust-gpu/issues/new&quot;</span>,
|handler| {
handler.note_without_error(<span class="macro">concat!</span>(
<span class="string">&quot;`rust-gpu` version `&quot;</span>,
Expand Down
4 changes: 2 additions & 2 deletions book/building-rust-gpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ <h2 id="getting-started"><a class="header" href="#getting-started">Getting start
<ol>
<li>
<p>Clone the repository.</p>
<pre><code class="language-shell">git clone --recurse-submodules https://github.com/EmbarkStudios/rust-gpu
<pre><code class="language-shell">git clone --recurse-submodules https://github.com/rust-gpu/rust-gpu
</code></pre>
</li>
<li>
<p><strong>optional</strong> Install <a href="https://github.com/KhronosGroup/SPIRV-Tools#downloads">SPIRV-Tools</a> and add it to your <code>PATH</code>. You can skip this step if you just want to run examples with the defaults. See <a href="#using-installed-spirv-tools">Using installed SPIRV-Tools</a> if you decide to go with this option.</p>
</li>
<li>
<p>Next, look at the <a href="https://github.com/EmbarkStudios/rust-gpu/tree/main/examples">examples</a> folder. There are two kinds of targets here: [runners] and [shaders]. The projects inside <code>shaders</code> are "GPU crates", i.e. ones that will be compiled to one or more SPIR-V modules. The <code>runner</code> projects are normal, CPU crates that use some graphics backend (currently, we have a <a href="https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/wgpu"><code>wgpu</code> runner</a>, a <a href="https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/ash">Vulkan runner</a> through <code>ash</code>, and a barebones pure software <a href="https://github.com/EmbarkStudios/rust-gpu/tree/main/examples/runners/cpu">CPU runner</a>) to actually run one of the "GPU crate" shaders.</p>
<p>Next, look at the <a href="https://github.com/rust-gpu/rust-gpu/tree/main/examples">examples</a> folder. There are two kinds of targets here: [runners] and [shaders]. The projects inside <code>shaders</code> are "GPU crates", i.e. ones that will be compiled to one or more SPIR-V modules. The <code>runner</code> projects are normal, CPU crates that use some graphics backend (currently, we have a <a href="https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/wgpu"><code>wgpu</code> runner</a>, a <a href="https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/ash">Vulkan runner</a> through <code>ash</code>, and a barebones pure software <a href="https://github.com/rust-gpu/rust-gpu/tree/main/examples/runners/cpu">CPU runner</a>) to actually run one of the "GPU crate" shaders.</p>
<p>Run the example:</p>
<pre><code class="language-shell">cargo run --bin example-runner-wgpu
</code></pre>
Expand Down
Loading

0 comments on commit a1541ae

Please sign in to comment.