1#![doc = document_features::document_features!()]
24#![no_std]
35#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
36#![doc(html_logo_url = "https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png")]
37#![warn(
38 clippy::alloc_instead_of_core,
39 clippy::allow_attributes,
40 clippy::std_instead_of_alloc,
41 clippy::std_instead_of_core,
42 missing_docs,
43 rust_2018_idioms,
44 unsafe_op_in_unsafe_fn
45)]
46#![allow(
47 clippy::large_enum_variant
49)]
50#![cfg_attr(not(send_sync), allow(clippy::arc_with_non_send_sync))]
52#![cfg_attr(not(any(wgpu_core, webgpu)), allow(unused))]
53
54extern crate alloc;
55#[cfg(std)]
56extern crate std;
57#[cfg(wgpu_core)]
58pub extern crate wgpu_core as wgc;
59#[cfg(wgpu_core)]
60pub extern crate wgpu_hal as hal;
61pub extern crate wgpu_types as wgt;
62
63mod api;
70mod backend;
71mod cmp;
72mod dispatch;
73mod macros;
74pub mod util;
75
76#[cfg(custom)]
83pub use backend::custom;
84
85pub use api::*;
86pub use wgt::{
87 AdapterInfo, AddressMode, AllocatorReport, AstcBlock, AstcChannel, Backend, BackendOptions,
88 Backends, BindGroupLayoutEntry, BindingType, BlendComponent, BlendFactor, BlendOperation,
89 BlendState, BufferAddress, BufferBindingType, BufferSize, BufferTextureCopyInfo,
90 BufferTransition, BufferUsages, BufferUses, Color, ColorTargetState, ColorWrites,
91 CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, CopyExternalImageDestInfo,
92 CoreCounters, DepthBiasState, DepthStencilState, DeviceLostReason, DeviceType,
93 DownlevelCapabilities, DownlevelFlags, DownlevelLimits, Dx12BackendOptions, Dx12Compiler,
94 DxcShaderModel, DynamicOffset, Extent3d, ExternalTextureFormat,
95 ExternalTextureTransferFunction, Face, Features, FeaturesWGPU, FeaturesWebGPU, FilterMode,
96 FrontFace, GlBackendOptions, GlFenceBehavior, Gles3MinorVersion, HalCounters,
97 ImageSubresourceRange, IndexFormat, InstanceDescriptor, InstanceFlags, InternalCounters,
98 Limits, MemoryBudgetThresholds, MemoryHints, MultisampleState, NoopBackendOptions, Origin2d,
99 Origin3d, PipelineStatisticsTypes, PollError, PollStatus, PolygonMode, PowerPreference,
100 PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology,
101 PushConstantRange, QueryType, RenderBundleDepthStencil, RequestAdapterError,
102 SamplerBindingType, SamplerBorderColor, ShaderLocation, ShaderModel, ShaderRuntimeChecks,
103 ShaderStages, StencilFaceState, StencilOperation, StencilState, StorageTextureAccess,
104 SurfaceCapabilities, SurfaceStatus, TexelCopyBufferLayout, TextureAspect, TextureDimension,
105 TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType,
106 TextureTransition, TextureUsages, TextureUses, TextureViewDimension, Trace, VertexAttribute,
107 VertexFormat, VertexStepMode, WasmNotSend, WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT,
108 COPY_BYTES_PER_ROW_ALIGNMENT, MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT,
109 QUERY_RESOLVE_BUFFER_ALIGNMENT, QUERY_SET_MAX_QUERIES, QUERY_SIZE, VERTEX_ALIGNMENT,
110};
111
112#[expect(deprecated)]
113pub use wgt::VERTEX_STRIDE_ALIGNMENT;
114
115#[cfg(web)]
118pub use wgt::{CopyExternalImageSourceInfo, ExternalImageSource};
119
120#[cfg(wgpu_core)]
123#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
124pub use ::wgc::naga;
126#[cfg(all(not(wgpu_core), naga))]
129#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
130pub use naga;
132
133pub use raw_window_handle as rwh;
136
137#[cfg(web)]
140pub use web_sys;
141
142#[doc(hidden)]
143pub use macros::helpers as __macro_helpers;