Skip to content

Commit

Permalink
Standalone Compute
Browse files Browse the repository at this point in the history
Fix Generate

Fix?

17th Time's The Charm

Fix Build

See Eye

Docs

Victory Tabular

Formatting

Formating3
  • Loading branch information
cwfitzgerald committed Jan 20, 2025
1 parent 377cad7 commit e82b409
Show file tree
Hide file tree
Showing 17 changed files with 401 additions and 456 deletions.
1 change: 1 addition & 0 deletions .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ allow = [
"Unicode-3.0",
"Zlib",
]
private = { ignore = true }

[sources]
allow-git = [
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: cargo-generate

on:
push:
branches: ["*"]
tags: [v0.*]
pull_request:
merge_group:

env:
#
# Dependency versioning
#

# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
REPO_MSRV: "1.83"
RUSTFLAGS: -D warnings

jobs:
cargo-generate:
timeout-minutes: 5

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- name: "hello-compute"
path: "examples/standalone/1_hello_compute"

name: "${{ matrix.name }}"

steps:
- uses: actions/checkout@v2

- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: "Install cargo-generate"
uses: taiki-e/install-action@v2
with:
tool: cargo-generate

- name: "Run cargo-generate"
run: |
cd ..
cargo generate --path wgpu --name ${{ matrix.name }} ${{ matrix.path }}
- name: "Check generated files"
run: |
cd ../${{ matrix.name }}/
cargo check
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]

## 23.0.1 (2024-11-25)

This release includes patches for `wgpu`, `wgpu-core` and `wgpu-hal`. All other crates remain at [23.0.0](https://github.com/gfx-rs/wgpu/releases/tag/v23.0.0).
This release includes patches for `wgpu`, `wgpu-core` and `wgpu-hal`. All other crates remain at [23.0.0](https://github.com/gfx-rs/wgpu/releases/tag/v24.0.0).
Below changes were cherry-picked from 24.0.0 development line.

### Bug fixes
Expand Down
20 changes: 15 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
# default members
"benches",
"examples/features",
# "examples/standalone/*",
"examples/standalone/*",
"lock-analyzer",
"naga-cli",
"naga",
Expand All @@ -26,7 +26,7 @@ exclude = []
default-members = [
"benches",
"examples/features",
# "examples/standalone/*",
"examples/standalone/*",
"lock-analyzer",
"naga-cli",
"naga",
Expand Down Expand Up @@ -219,6 +219,9 @@ ndk-sys = "0.5.0"
#js-sys = { path = "../wasm-bindgen/crates/js-sys" }
#wasm-bindgen = { path = "../wasm-bindgen" }

# These overrides allow our examples to explicitly depend on release crates
wgpu = { path = "./wgpu" }

[profile.release]
lto = "thin"
debug = true
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@

The API is based on the [WebGPU standard](https://gpuweb.github.io/gpuweb/). It serves as the core of the WebGPU integration in Firefox, Servo, and Deno.

## Quick Links

| Docs | Examples | Changelog |
|:------------------------------------:|:--------------------------------------------------------------------:|:----------------------------------------------------------------------------:|
| [v24](https://docs.rs/wgpu/) | [v24](https://github.com/gfx-rs/wgpu/tree/v24/examples#readme) | [v24](https://github.com/gfx-rs/wgpu/releases) |
| [`trunk`](https://wgpu.rs/doc/wgpu/) | [`trunk`](https://github.com/gfx-rs/wgpu/tree/trunk/examples#readme) | [`trunk`](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#unreleased) |

## Repo Overview

The repository hosts the following libraries:
Expand Down Expand Up @@ -42,14 +49,12 @@ Go to [https://wgpu.rs/examples/] to play with our examples in your browser. Req

Rust examples can be found at [wgpu/examples](examples). You can run the examples on native with `cargo run --bin wgpu-examples <example>`. See the [list of examples](examples).

If you are new to wgpu and graphics programming, we recommend starting with https://sotrh.github.io/learn-wgpu/.

To run the examples in a browser, run `cargo xtask run-wasm`.
Then open `http://localhost:8000` in your browser, and you can choose an example to run.
Naturally, in order to display any of the WebGPU based examples, you need to make sure your browser supports it.

If you are looking for a wgpu tutorial, look at the following:

- https://sotrh.github.io/learn-wgpu/

### C/C++

To use wgpu in C/C++, you need [wgpu-native](https://github.com/gfx-rs/wgpu-native).
Expand Down
Loading

0 comments on commit e82b409

Please sign in to comment.