3 releases

0.1.3 Nov 3, 2024
0.1.2 Apr 15, 2024
0.1.1 Apr 15, 2024
0.1.0 Apr 15, 2024

#231 in WebAssembly

Download history 36/week @ 2024-07-29 18/week @ 2024-09-23 32/week @ 2024-09-30 41/week @ 2024-10-28 113/week @ 2024-11-04 9/week @ 2024-11-11

163 downloads per month

MIT/Apache

20KB

WebGPU Check

A simple, minimal crate to probe WebGPU support prior to running your application.

Discord MIT/Apache 2.0 Build status dependency status Crates.io Docs

Quickstart to run demo:

  • Web
# 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
  • Native
cargo run --example simple

There is also a web demo available here.

Usage

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...
}

Community

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.

License

Licensed under either of

at your option

Contribution

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.

Dependencies

~0–2.3MB
~42K SLoC