Guide for using gfx-rs's wgpu library.
Go to file
dependabot[bot] 2666644491
Bump openssl from 0.10.48 to 0.10.60
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.48 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.60)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 02:14:33 +00:00
.cargo more-testing 2022-02-19 12:43:56 -07:00
.github/workflows attempting to fix deploy.yml 2023-03-25 14:55:33 -06:00
code Merge pull request #505 from iwek7/fix_space 2023-11-27 17:41:28 -07:00
docs Merge branch 'master' into update-tutorial2 2023-11-30 19:10:25 -07:00
run-wasm more-testing 2022-02-19 12:43:56 -07:00
.gitignore adding wgpu to fully qualify include_wgsl! macro as part of #423 2022-12-10 12:18:58 -07:00
.yarnrc.yml adding wgpu to fully qualify include_wgsl! macro as part of #423 2022-12-10 12:18:58 -07:00
build-wasm.sh switched to custom wasm-builder instead of wasm-pack for examples 2023-03-25 14:16:07 -06:00
Cargo.lock Bump openssl from 0.10.48 to 0.10.60 2023-12-01 02:14:33 +00:00
Cargo.toml fixed pong 2023-11-23 21:40:08 -07:00
FEATURES.md some fixes to web 2021-12-03 14:18:06 -07:00
index.template.html wasm is building 2021-10-22 15:55:39 -06:00
LICENSE.md license 2020-09-02 12:59:22 -06:00
package-lock.json Bump @babel/traverse from 7.17.3 to 7.23.2 2023-10-17 17:55:26 +00:00
package.json try using yarn for deploy.yml 2023-03-25 14:42:50 -06:00
run-all.sh 0.18 and hdr tutorial 2023-11-05 17:49:55 -07:00
rustfmt.toml rustfmt 2020-09-27 23:24:43 -06:00
wasm-targets.json finished hdr writeup 2023-11-04 23:12:15 -06:00
yarn.lock Bump @babel/traverse from 7.17.3 to 7.23.2 2023-10-17 17:55:26 +00:00

Introduction

What is wgpu?

Wgpu is a Rust implementation of the WebGPU API spec. WebGPU is a specification published by the GPU for the Web Community Group. It aims to allow web code access to GPU functions in a safe and reliable manner. It does this by mimicking the Vulkan API, and translating that down to whatever API the host hardware is using (ie. DirectX, Metal, Vulkan).

Wgpu is still in development, so some of this doc is subject to change.

Why Rust?

Wgpu actually has C bindings to allow you to write C/C++ code with it, as well as use other languages that interface with C. That being said, wgpu is written in Rust, and it has some convenient Rust bindings that don't have to jump through any hoops. On top of that, I've been enjoying writing in Rust.

You should be fairly familiar with Rust before using this tutorial as I won't go into much detail on Rust syntax. If you're not super comfortable with Rust you can review the Rust tutorial. You should also be familiar with Cargo.

I'm using this project to learn wgpu myself, so I might miss some important details, or explain things badly. I'm always open to constructive feedback.

Contribution and Support

  • I accept pull requests (GitHub repo) for fixing issues with this tutorial such as typos, incorrect information, and other inconsistencies.
  • Due to wgpu's rapidly changing api, I'm not accepting any new pull requests for showcase demos.
  • If you want to support me directly, check out my patreon!

Translations

Special thanks to these patrons!

  • David Laban
  • Lennart
  • Ian Gowen
  • Aron Granberg
  • Bernard Llanos
  • Jan Šipr
  • Zeh Fernando
  • Youngsuk Kim
  • オリトイツキ
  • Andrea Postal
  • Julius Liu
  • Feng Liang
  • Mattia Samiolo
  • Joris Willems
  • Jani Turkia
  • papyDoctor
  • Filip