# Update to 0.16

Very few changes here! We no longer need to use NonZeroU32 and the like, instead it will be an Option<u32>. This is mostly used in dealing with textures.

    wgpu::ImageCopyTexture {
        aspect: wgpu::TextureAspect::All,
        texture: &texture,
        mip_level: 0,
        origin: wgpu::Origin3d::ZERO,
    wgpu::ImageDataLayout {
        offset: 0,
        // bytes_per_row: NonZeroU32::new(4 * dimensions.0),
        bytes_per_row: Some(4 * dimensions.0),
        // rows_per_image: NonZeroU32::new(dimensions.1),
        rows_per_image: Some(dimensions.1),

In other news WebGPU has been added to Chrome 113 and up! Currently the Linux version of Chrome beta isn't working and while it's working in Firefox, I'm going to hold off on switching to using that instead of the WebGL compatibility mode. If you mess around with WebGPU in browser check https://caniuse.com/webgpu (opens new window) to see if your browser is supported and then remove the extra wgpu line from the [target.'cfg(target_arch = "wasm32")'.dependencies] section of Cargo.toml:

[target.'cfg(target_arch = "wasm32")'.dependencies]
reqwest = { version = "0.11" }
console_error_panic_hook = "0.1"
console_log = "1.0"
# wgpu = { version = "0.18", features = ["webgl"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [

No other changes need to be made to switch to using WebGPU in browser, so once the WebGPU samples at https://webgpu.github.io/ (opens new window) work in Chrome on Linux, I'll look into removing the webgl feature.

That's all! As always let me know if I missed anything!

Last Updated: 1/20/2024, 10:13:50 PM