Guide for using gfx-rs's wgpu library.
Go to file
sotrh 68e06ea4a4
Merge pull request #125 from dannyfritz/patch-1
Texture: BufferInitDescriptor fields.
2020-11-23 23:36:09 -07:00
code finished cleanup 2020-11-23 23:29:52 -07:00
docs Merge pull request #125 from dannyfritz/patch-1 2020-11-23 23:36:09 -07:00
.gitignore fixes #108 2020-10-17 14:51:41 -06:00
Cargo.lock basic imgui example 2020-11-23 22:16:25 -07:00
Cargo.toml started performance research 2020-06-21 00:49:43 -06:00
deploy.sh fixing deploy.sh 2020-04-17 21:28:41 -06:00
FEATURES.md tutorial4-buffer 2019-10-25 01:57:14 -06:00
LICENSE.md license 2020-09-02 12:59:22 -06:00
package-lock.json Bump http-proxy from 1.18.0 to 1.18.1 2020-09-10 16:07:32 +00:00
package.json finished lighting rewrite 2020-04-17 21:23:19 -06:00
run-all.sh fixed code for #116 2020-11-18 10:48:28 -07:00
rustfmt.toml rustfmt 2020-09-27 23:24:43 -06: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 convient 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 about Cargo.

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

Contribution and Support

  • I accept pull requests 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!