Crates.io | webgpu_check |
lib.rs | webgpu_check |
version | 0.1.3 |
source | src |
created_at | 2024-04-15 02:14:50.186831 |
updated_at | 2024-11-03 22:18:49.498521 |
description | A simple, minimal crate to probe WebGPU support. |
homepage | |
repository | https://github.com/loopystudios/webgpu_check |
max_upload_size | |
id | 1208724 |
size | 65,991 |
Quickstart to run demo:
# Make sure the Rust toolchain supports the wasm32 target
rustup target add wasm32-unknown-unknown
# Install `wasm-server-runner` for the example
cargo install wasm-server-runner
cargo run --target wasm32-unknown-unknown --example simple
cargo run --example simple
There is also a web demo available here.
One can simply check, at the beginning of their application, whether WebGPU is supported, and react accordingly.
fn main() {
if !webgpu_check::is_webgpu_available() {
panic!("This platform doesn't support WebGPU!");
}
// Proceed to run your WebGPU application...
}
All Loopy projects and development happens in the Loopy Discord. The discord is open to the public.
Contributions are welcome by pull request. The Rust code of conduct applies.
Licensed under either of
at your option
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.