1#![doc = document_features::document_features!()]
7#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
18#![doc(html_logo_url = "https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png")]
19#![warn(
20 clippy::allow_attributes,
21 missing_docs,
22 rust_2018_idioms,
23 unsafe_op_in_unsafe_fn
24)]
25#![allow(clippy::arc_with_non_send_sync)]
26#![cfg_attr(not(any(wgpu_core, webgpu)), allow(unused))]
27
28mod api;
35mod backend;
36mod cmp;
37mod dispatch;
38mod macros;
39pub mod util;
40
41pub use api::*;
54pub use wgt::{
55 AdapterInfo, AddressMode, AstcBlock, AstcChannel, Backend, BackendOptions, Backends,
56 BindGroupLayoutEntry, BindingType, BlendComponent, BlendFactor, BlendOperation, BlendState,
57 BufferAddress, BufferBindingType, BufferSize, BufferUsages, Color, ColorTargetState,
58 ColorWrites, CommandBufferDescriptor, CompareFunction, CompositeAlphaMode,
59 CopyExternalImageDestInfo, CoreCounters, DepthBiasState, DepthStencilState, DeviceLostReason,
60 DeviceType, DownlevelCapabilities, DownlevelFlags, Dx12BackendOptions, Dx12Compiler,
61 DynamicOffset, Extent3d, Face, Features, FilterMode, FrontFace, GlBackendOptions,
62 Gles3MinorVersion, HalCounters, ImageSubresourceRange, IndexFormat, InstanceDescriptor,
63 InstanceFlags, InternalCounters, Limits, MaintainResult, MemoryHints, MultisampleState,
64 Origin2d, Origin3d, PipelineStatisticsTypes, PolygonMode, PowerPreference,
65 PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology,
66 PushConstantRange, QueryType, RenderBundleDepthStencil, SamplerBindingType, SamplerBorderColor,
67 ShaderLocation, ShaderModel, ShaderRuntimeChecks, ShaderStages, StencilFaceState,
68 StencilOperation, StencilState, StorageTextureAccess, SurfaceCapabilities, SurfaceStatus,
69 TexelCopyBufferLayout, TextureAspect, TextureDimension, TextureFormat,
70 TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType, TextureUsages,
71 TextureViewDimension, VertexAttribute, VertexFormat, VertexStepMode, WasmNotSend,
72 WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT,
73 MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT, QUERY_RESOLVE_BUFFER_ALIGNMENT, QUERY_SET_MAX_QUERIES,
74 QUERY_SIZE, VERTEX_STRIDE_ALIGNMENT,
75};
76#[expect(deprecated)]
77pub use wgt::{ImageCopyBuffer, ImageCopyTexture, ImageCopyTextureTagged, ImageDataLayout};
78#[cfg(any(webgpu, webgl))]
81#[expect(deprecated)]
82pub use wgt::ImageCopyExternalImage;
83#[cfg(any(webgpu, webgl))]
84pub use wgt::{CopyExternalImageSourceInfo, ExternalImageSource};
85#[cfg(wgpu_core)]
94pub use ::wgc as core;
95
96#[cfg(wgpu_core)]
100pub use ::hal;
101
102#[cfg(wgpu_core)]
105#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
106pub use ::wgc::naga;
108#[cfg(all(not(wgpu_core), naga))]
111#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
112pub use naga;
114
115pub use raw_window_handle as rwh;
118
119#[cfg(any(webgl, webgpu))]
122pub use web_sys;
123
124#[cfg(webgpu)]
127extern crate alloc;