Skip to content

Commit 4726436

Browse files
committed
Working website.
1 parent a3c97f7 commit 4726436

16 files changed

+733
-5
lines changed

config.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# The URL the site will be built for
22
base_url = "https://rust-gpu.github.io"
3-
43
# Whether to automatically compile all Sass files in the sass directory
54
compile_sass = true
6-
75
# Whether to build a search index to be used later on by a JavaScript library
86
build_search_index = true
9-
107
theme = "juice"
118

9+
generate_feeds = true
10+
1211
[markdown]
1312
# Whether to do syntax highlighting
1413
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
@@ -19,9 +18,14 @@ highlight_theme = "cheerfully-light"
1918
juice_logo_name = "Rust GPU"
2019
juice_logo_path = ""
2120
rust_crate = "rust-gpu"
22-
github_repo = "Rust-GPU/rust-gpu"
21+
github_repo = "embarkstudios/rust-gpu"
2322
website_github_repo = "Rust-GPU/rust-gpu.github.io"
2423
site_description = "Rust on GPUs."
25-
page_menu = [
24+
juice_exclude_menu = ["Ecosystem", "Changelog", "Blog"]
25+
juice_extra_menu = [
26+
{ title = "Docs", link = "https://embarkstudios.github.io/rust-gpu/book/" },
27+
{ title = "Blog", link = "/blog/" },
28+
{ title = "Ecosystem", link = "/ecosystem/" },
29+
{ title = "Changelog", link = "/changelog/" },
2630
{ title = "GitHub", link = "https://github.com/Rust-GPU/rust-gpu" },
2731
]

content/_index.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
+++
2+
title = "Rust GPU"
3+
sort_by = "weight"
4+
+++
5+
6+
Rust GPU makes it possible to write and run GPU software in Rust, leveraging the
7+
language's powerful safety and concurrency features to enhance performance and
8+
reliability. With Rust GPU, you can seamlessly develop for both CPU and GPU using a
9+
unified codebase, all while benefiting from Rust’s existing ecosystem.
10+
11+
## Multi-Vendor
12+
13+
The Rust GPU compiler backend emits code compatible with
14+
[Vulkan](https://www.vulkan.org), ensuring your code runs across a wide range of devices
15+
and vendors.
16+
17+
If instead you wish to stick to the NVIDIA ecosystem, stay tuned as the [Rust
18+
CUDA](https://github.com/rust-gpu/rust-cuda) project is in the process of being rebooted
19+
and possibly integrated with Rust GPU.
20+
21+
## Modern and Unified
22+
23+
There is no longer a need to learn a GPU-specific programming language. You can write
24+
both CPU and GPU code in Rust, leveraging your existing Rust knowledge and maintaining a
25+
consistent development experience. Furthermore, the _same code can run on both the CPU
26+
and GPU_, with divergent behavior gated behind `cfg` attributes and macros where
27+
necessary.
28+
29+
Even if your current codebase isn't written in Rust, choosing Rust for the GPU parts
30+
gives you more widely applicable skills in one of the [fastest-growing languages on
31+
GitHub](https://octoverse.github.com/2022/top-programming-languages). Rust is also one
32+
of the [most admired programming
33+
languages](https://github.blog/developer-skills/programming-languages-and-frameworks/why-rust-is-the-most-admired-language-among-developers/)
34+
while GPU-specific languages are considered a necessary evil.
35+
36+
## Fearless Concurrency
37+
38+
Rust's ownership model and type system guarantee memory
39+
safety, minimizing bugs and undefined behavior. Rust's borrow checker also enables
40+
fearless concurrency, which is essential for maximizing performance on massively
41+
parallel GPUs.
42+
43+
## Powerful Abstractions
44+
45+
Programming in GPU-specific languages can often feel like [taking a step back to the
46+
90s](https://xol.io/blah/death-to-shading-languages/), where primitive tools and sharp
47+
edges abound. Because of this, code written for GPUs is simplistic with low cyclomatic
48+
complexity. Rust has an expressive type system and zero-cost abstractions that enable
49+
writing high-level, reusable code without sacrificing performance. This approach leads
50+
to more maintainable and sophisticated GPU programs, streamlining the development
51+
process and enhancing productivity.
52+
53+
## Existing Ecosystem
54+
55+
The state-of-the-art for sharing GPU code is copy
56+
and pasting. With Rust GPU we are excited to bring the excellent `cargo` and
57+
crates.io ecosystem to GPU programming and provide some sanity.
58+
59+
Additionally, Rust's `no_std` ecosystem offers a wide array of libraries that can be
60+
used in environments without the standard library. Traditionally this has meant
61+
embedded devices, but a lot of the same assumptions apply to GPU shaders! As a
62+
consequence, you can reuse [existing `no_std` libraries from
63+
crates.io](https://crates.io/categories/no-std::no-alloc) in your GPU code _without
64+
the authors explicitly adding GPU support_. This is uniquely enabled by Rust GPU's
65+
implementation choices and Rust's
66+
[registers](https://without.boats/blog/the-registers-of-rust/). Sharing and reusing
67+
code from the greater Rust ecosystem is a superpower when writing GPU programs that
68+
will massively compound over time.
69+
70+
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
+++
2+
title = "Rust GPU Transitions to Community Ownership"
3+
authors = ["LegNeato", "eddyb"]
4+
+++
5+
6+
We are excited to announce that as of today the <a
7+
href="https://rust-gpu.github.io">Rust GPU</a> project will be transitioning from
8+
[Embark Studios](https://www.embark-studios.com/) to community ownership under the [Rust
9+
GPU GitHub organization](https://github.com/rust-gpu/rust-gpu). This move marks the
10+
beginning of a broader strategy aimed at revitalizing, unifying, and standardizing GPU
11+
programming in Rust. We are eager to share more details in the near future but in the
12+
meantime if you are a maintainer of a GPU-related Rust project, please reach out!
13+
14+
## What is Rust GPU?
15+
16+
<a href="https://rust-gpu.github.io">Rust GPU</a> makes it possible to write and run GPU
17+
software in Rust, leveraging the language's powerful safety and concurrency features to
18+
enhance performance and reliability. With Rust GPU, you can seamlessly develop for both
19+
CPU and GPU using a unified codebase, all while benefiting from Rust’s existing
20+
ecosystem.
21+
22+
The Rust GPU compiler backend emits code compatible with
23+
[Vulkan](https://www.vulkan.org), ensuring your code runs across a wide range of devices
24+
and vendors.
25+
26+
If instead you wish to stick to the NVIDIA ecosystem, stay tuned as the [Rust
27+
CUDA](https://github.com/rust-gpu/rust-cuda) project is in the process of being rebooted
28+
and possibly integrated with Rust GPU.
29+
30+
To put Rust GPU in context, here's an overview of the current landscape:
31+
32+
- [rust-gpu](https://github.com/EmbarkStudios/rust-gpu): Compiles unmodified Rust code to
33+
[SPIR-V](https://www.khronos.org/spir/) (Vulkan) so that it can run on the GPU.
34+
- [rust-cuda](https://github.com/Rust-GPU/Rust-CUDA): Compiles unmodified Rust code to
35+
[NVVM](https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html) (CUDA) so that it can run
36+
on the GPU. _Currently unmaintained but stay tuned!_
37+
- [nvptx backend in
38+
rustc](https://doc.rust-lang.org/rustc/platform-support/nvptx64-nvidia-cuda.html):
39+
Compiles unmodified Rust code to
40+
[PTX](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html) (CUDA) so
41+
that it can run on the GPU.
42+
- [CubeCL](https://github.com/tracel-ai/cubecl): Compute language extension for Rust.
43+
Enables annotated Rust code to run on the GPU.
44+
- [krnl](https://github.com/charles-r-earp/krnl): Safe, portable, high performance
45+
compute (GPGPU) kernels. Enables annotated Rust code to run on the GPU (via Rust GPU).
46+
- [cudarc](https://github.com/coreylowman/cudarc): Minimal and safe api over the CUDA
47+
toolkit. Enables calling CUDA from Rust running on the CPU.
48+
- [wgpu](https://wgpu.rs/): A safe and portable graphics library for Rust based on the
49+
WebGPU API. Enables communicating with the GPU from Rust running on the CPU.
50+
- [naga](https://github.com/gfx-rs/wgpu/tree/trunk/naga): A source code translator
51+
written in Rust that converts between various GPU-specific shader languages
52+
([WGSL](https://www.w3.org/TR/WGSL/),
53+
[GLSL](https://en.wikipedia.org/wiki/OpenGL_Shading_Language),
54+
[HLSL](https://en.wikipedia.org/wiki/High-Level_Shader_Language), and
55+
[MSL](https://developer.apple.com/metal/)). These shaders ultimately run on the GPU.
56+
- [ZLUDA](https://github.com/vosen/ZLUDA): A drop-in replacement for CUDA written in
57+
Rust. Enables using tools and libraries targeted at CUDA on non-NVIDIA hardware.
58+
- [Ashai Linux GPU
59+
Drivers](https://asahilinux.org/2022/12/gpu-drivers-now-in-asahi-linux/): GPU drivers
60+
partially written in Rust to add Linux support for Apple GPUs.
61+
62+
## Why Rust for GPU Programming?
63+
64+
1. **Modern and Unified Experience:** There is no longer a need to learn a GPU-specific
65+
programming language. You can write both CPU and GPU code in Rust, leveraging your
66+
existing Rust knowledge and maintaining a consistent development experience.
67+
Furthermore, the _same code can run on both the CPU and GPU_, with divergent behavior
68+
gated behind `cfg` attributes and macros where necessary.
69+
70+
Even if your current codebase isn't written in Rust, choosing Rust for the GPU parts
71+
instead of GPU-specific languages gives you more widely applicable skills in one of
72+
the [fastest-growing languages on
73+
GitHub](https://octoverse.github.com/2022/top-programming-languages). Rust is also
74+
one of the [most admired programming
75+
languages](https://github.blog/developer-skills/programming-languages-and-frameworks/why-rust-is-the-most-admired-language-among-developers/)
76+
while GPU-specific languages are considered a necessary evil.
77+
78+
2. **Fearless Concurrency:** Rust's ownership model and type system guarantee memory
79+
safety, minimizing bugs and undefined behavior. Rust's borrow checker also enables
80+
fearless concurrency, which is essential for maximizing performance on massively
81+
parallel GPUs.
82+
83+
3. **Powerful Abstractions:** Programming in GPU-specific languages can often feel like
84+
[taking a step back to the 90s](https://xol.io/blah/death-to-shading-languages/),
85+
where primitive tools and sharp edges abound. Because of this, code written for GPUs
86+
is simplistic with low cyclomatic complexity. Rust has an expressive type system and
87+
zero-cost abstractions that enable writing high-level, reusable code without
88+
sacrificing performance. This approach leads to more maintainable and sophisticated
89+
GPU programs, streamlining the development process and enhancing productivity.
90+
91+
4. **Leverage Existing Ecosystem:** The state-of-the-art for sharing GPU code is copy
92+
and pasting. With Rust GPU we are excited to bring the excellent `cargo` and
93+
crates.io ecosystem to GPU programming and provide some sanity.
94+
95+
Additionally, Rust's `no_std` ecosystem offers a wide array of libraries that can be
96+
used in environments without the standard library. Traditionally this has meant
97+
embedded devices, but a lot of the same assumptions apply to GPU shaders! As a
98+
consequence, you can reuse [existing `no_std` libraries from
99+
crates.io](https://crates.io/categories/no-std::no-alloc) in your GPU code _without
100+
the authors explicitly adding GPU support_. This is uniquely enabled by Rust GPU's
101+
implementation choices and Rust's
102+
[registers](https://without.boats/blog/the-registers-of-rust/). Sharing and reusing
103+
code from the greater Rust ecosystem is a superpower when writing GPU programs that
104+
will massively compound over time.
105+
106+
Soon developers will write and share Rust libraries that _require_ running on the
107+
GPU, similar to how some existing open source libraries require a specific OS or CPU
108+
architecture. We expect many innovative GPU-specific algorithms and projects to be
109+
built in Rust.
110+
111+
## A Heartfelt Thank You to Embark
112+
113+
First and foremost, we extend our deepest gratitude to [Embark
114+
Studios](https://www.embark-studios.com/) for their incredible work in kickstarting and
115+
supporting the Rust GPU project. Their dedication and contributions have been
116+
invaluable, laying a strong foundation for the future. The community is immensely
117+
grateful for all the resources and expertise Embark has poured into this project.
118+
119+
## Transition Challenges: Repository Transfer
120+
121+
Unfortunately, Embark has decided not to transfer the existing repository via [GitHub's
122+
transfer
123+
tool](https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository),
124+
which means we will lose all our stars, issues, and pull requests. Additionally,
125+
automatic GitHub redirects will not be added. All this causes avoidable churn.
126+
127+
We have not fully transitioned to the new community-owned repository due to these
128+
downsides and we believe the best course of action is to encourage Embark to reconsider
129+
and simply press the GitHub transfer button, easing this transition for everyone
130+
involved. We appreciate the community's patience and understanding as we get things
131+
sorted out and we'd love your support encouraging Embark to reconsider the mechanics of
132+
the transfer.
133+
134+
## New Focus: GPU Compute and GPGPU
135+
136+
With the industry's growing emphasis on generative AI and LLMs, we are shifting our
137+
primary focus towards GPU compute and General-Purpose GPU (GPGPU) programming. This also
138+
aligns with the trend in GPU hardware to increasingly utilize the compute capabilities
139+
of GPUs to run graphics pipelines as software libraries rather than relying on
140+
specialized hardware. Even graphics-focused programs such as video games are moving away
141+
from solely relying on graphics pipelines and instead running as much of the engine as
142+
possible in GPU compute.
143+
144+
In the past, the primary focus on graphics use-cases did not materialize the necessary
145+
contributors and community engagement to make the Rust GPU project sustainable. We hope
146+
our new focus will attract more contributors and users.
147+
148+
However, it is important to note that graphics use-cases will continue to be supported,
149+
developed, and improved in Rust GPU! We appreciate our early graphics adopters and
150+
remain committed to enhancing the graphics capabilities of Rust GPU.
151+
152+
## Addressing Stability and Nightly Rust
153+
154+
Though Rust GPU requires the nightly version of Rust, Embark had unique stability goals
155+
which resulted in Rust GPU not tracking the _latest_ nightly. This has been a hurdle for
156+
adoption, as most people experimenting with Rust GPU are likely already on nightly to
157+
get the latest and greatest, not use a randomly chosen nightly from months ago. To
158+
address this, we will be tracking the latest Rust nightly builds moving forward. For
159+
those concerned about stability, you can pin to a particular nightly version via <a
160+
href="https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file">`rust-toolchain`</a>,
161+
and there are ways to build your GPU code with nightly while keeping your CPU code on
162+
stable.
163+
164+
With today's release we are closer to this goal but we aren't quite tracking the latest
165+
nightly yet as some newer `rustc` changes require more substantial changes to Rust GPU's
166+
compiler backend.
167+
168+
## Short-Term Roadmap
169+
170+
Our immediate focus is on the following tasks:
171+
172+
- **Merge all outstanding work.**
173+
- **Track the latest Rust nightly.** Stay up-to-date with the latest developments in
174+
Rust and catch changes that break Rust GPU's compiler backend as soon as they land
175+
upstream.
176+
- **Release more often.** Increase our release cadence to deliver improvements and fixes
177+
more frequently, as well as aid in debugging issues.
178+
- **Extend/update documentation, FAQ, and guides.** Provide solutions to common problems
179+
and usage scenarios and document unsupported language constructs.
180+
- **Better compatibility.**
181+
- Fully switch to [quasi-pointers](https://github.com/EmbarkStudios/spirt/pull/24) to
182+
support more advanced Rust constructs.
183+
- Add `alloc` support. This will allow us to move from supporting [at most 500
184+
`no_std`, no alloc crates](https://crates.io/categories/no-std::no-alloc) to [over
185+
6,000 `no_std` + alloc crates](https://crates.io/categories/no-std).
186+
- **Better testing.**
187+
- Develop our own crater-like tool to create a burndown list of `no_std` and `alloc`
188+
crates that don't work with Rust GPU.
189+
- Implement a differential testing harness.
190+
- Establish ecosystem CI similar to the [SWC
191+
project](https://github.com/swc-project/swc/tree/main/.github/swc-ecosystem-ci).
192+
193+
## Long-Term Vision: First-Class GPU Targets in Rust
194+
195+
Looking further ahead, one of our ambitious goals is to merge Rust GPU or its successor
196+
into the Rust compiler itself. We want to make GPUs (and TPUs and NPUs) first-class
197+
targets in Rust and make programming them as ergonomic as CPU programming. **Hardware is
198+
shifting from scalar, serial processing to matrix, parallel processing—software must do
199+
the same.** We are excited about the future of Rust GPU and the potential it holds.
200+
201+
Thank you for your continued support and contributions. Stay tuned for more updates, and
202+
don't hesitate to reach out if you have any questions or want to get involved.
203+
204+
Happy coding!
205+
206+
_LegNeato ([GitHub](https://github.com/LegNeato),
207+
[Twitter](https://twitter.com/legneato)) and eddyb ([GitHub](https://github.com/eddyb))_
208+
209+
**Rust GPU Maintainers**

content/blog/_index.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
+++
2+
title = "Blog"
3+
4+
description = ""
5+
6+
template = "blog.html"
7+
8+
# A draft section is only loaded if the `--drafts` flag is passed to `zola build`, `zola serve` or `zola check`.
9+
draft = false
10+
11+
# Used to sort pages by "date", "update_date", "title", "title_bytes", "weight", "slug" or "none". See below for more information.
12+
sort_by = "date"
13+
14+
# Used by the parent section to order its subsections.
15+
# Lower values have higher priority.
16+
weight = 0
17+
18+
# The given template is applied to ALL pages below the section, recursively.
19+
# If you have several nested sections, each with a page_template set, the page
20+
# will always use the closest to itself.
21+
# However, a page's own `template` variable will always have priority.
22+
# Not set by default.
23+
24+
# This sets the number of pages to be displayed per paginated page.
25+
# No pagination will happen if this isn't set or if the value is 0.
26+
paginate_by = 0
27+
28+
# If set, this will be the path used by the paginated page. The page number will be appended after this path.
29+
# The default is page/1.
30+
paginate_path = "page"
31+
32+
# If set, there will pagination will happen in a reversed order.
33+
paginate_reversed = false
34+
35+
# This determines whether to insert a link for each header like the ones you can see on this site if you hover over
36+
# a header.
37+
# The default template can be overridden by creating an `anchor-link.html` file in the `templates` directory.
38+
# This value can be "left", "right", "heading" or "none".
39+
# "heading" means the full heading becomes the text of the anchor.
40+
insert_anchor_links = "right"
41+
42+
# If set to "true", the section pages will be in the search index. This is only used if
43+
# `build_search_index` is set to "true" in the Zola configuration file.
44+
in_search_index = true
45+
46+
# If set to "true", the section homepage is rendered.
47+
# Useful when the section is used to organize pages (not used directly).
48+
render = true
49+
50+
# This determines whether to redirect when a user lands on the section. Defaults to not being set.
51+
# Useful for the same reason as `render` but when you don't want a 404 when
52+
# landing on the root section page.
53+
# Example: redirect_to = "documentation/content/overview"
54+
55+
# If set to "true", the section will pass its pages on to the parent section. Defaults to `false`.
56+
# Useful when the section shouldn't split up the parent section, like
57+
# sections for each year under a posts section.
58+
transparent = false
59+
60+
# Use aliases if you are moving content but want to redirect previous URLs to the
61+
# current one. This takes an array of paths, not URLs.
62+
aliases = []
63+
64+
# If set to "true", feed files will be generated for this section at the
65+
# section's root path. This is independent of the site-wide variable of the same
66+
# name. The section feed will only include posts from that respective feed, and
67+
# not from any other sections, including sub-sections under that section.
68+
generate_feeds = true
69+
70+
# Your own data.
71+
[extra]
72+
+++
73+
74+
Rust GPU announcements, tips and tricks, and community showcases.

content/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
+++
2+
title = "Changelog"
3+
weight = 2
4+
template = "changelog.html"
5+
+++
6+
7+
{{ fetch_github(path="CHANGELOG.md") }}

0 commit comments

Comments
 (0)