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 clippy::bool_assert_comparison,
51 clippy::bool_comparison,
52)]
53#![cfg_attr(not(send_sync), allow(clippy::arc_with_non_send_sync))]
55#![cfg_attr(not(any(wgpu_core, webgpu)), allow(unused))]
56
57extern crate alloc;
58#[cfg(std)]
59extern crate std;
60#[cfg(wgpu_core)]
61pub extern crate wgpu_core as wgc;
62#[cfg(wgpu_core)]
63pub extern crate wgpu_hal as hal;
64pub extern crate wgpu_types as wgt;
65
66mod api;
73mod backend;
74mod cmp;
75mod dispatch;
76mod macros;
77pub mod util;
78
79#[cfg(custom)]
86pub use backend::custom;
87
88pub use api::*;
89pub use wgt::{
90 AdapterInfo, AddressMode, AllocatorReport, AstcBlock, AstcChannel, Backend, BackendOptions,
91 Backends, BindGroupLayoutEntry, BindingType, BlendComponent, BlendFactor, BlendOperation,
92 BlendState, BufferAddress, BufferBindingType, BufferSize, BufferTextureCopyInfo,
93 BufferTransition, BufferUsages, BufferUses, Color, ColorTargetState, ColorWrites,
94 CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, CopyExternalImageDestInfo,
95 CoreCounters, DepthBiasState, DepthStencilState, DeviceLostReason, DeviceType,
96 DownlevelCapabilities, DownlevelFlags, DownlevelLimits, Dx12BackendOptions, Dx12Compiler,
97 DxcShaderModel, DynamicOffset, ExperimentalFeatures, Extent3d, ExternalTextureFormat,
98 ExternalTextureTransferFunction, Face, Features, FeaturesWGPU, FeaturesWebGPU, FilterMode,
99 FrontFace, GlBackendOptions, GlFenceBehavior, Gles3MinorVersion, HalCounters,
100 ImageSubresourceRange, IndexFormat, InstanceDescriptor, InstanceFlags, InternalCounters,
101 Limits, MemoryBudgetThresholds, MemoryHints, MultisampleState, NoopBackendOptions, Origin2d,
102 Origin3d, PipelineStatisticsTypes, PollError, PollStatus, PolygonMode, PowerPreference,
103 PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology,
104 PushConstantRange, QueryType, RenderBundleDepthStencil, RequestAdapterError,
105 SamplerBindingType, SamplerBorderColor, ShaderLocation, ShaderModel, ShaderRuntimeChecks,
106 ShaderStages, StencilFaceState, StencilOperation, StencilState, StorageTextureAccess,
107 SurfaceCapabilities, SurfaceStatus, TexelCopyBufferLayout, TextureAspect, TextureDimension,
108 TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType,
109 TextureTransition, TextureUsages, TextureUses, TextureViewDimension, Trace, VertexAttribute,
110 VertexFormat, VertexStepMode, WasmNotSend, WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT,
111 COPY_BYTES_PER_ROW_ALIGNMENT, MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT,
112 QUERY_RESOLVE_BUFFER_ALIGNMENT, QUERY_SET_MAX_QUERIES, QUERY_SIZE, VERTEX_ALIGNMENT,
113};
114
115#[expect(deprecated)]
116pub use wgt::VERTEX_STRIDE_ALIGNMENT;
117
118#[cfg(web)]
121pub use wgt::{CopyExternalImageSourceInfo, ExternalImageSource};
122
123#[cfg(wgpu_core)]
126#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
127pub use ::wgc::naga;
129#[cfg(all(not(wgpu_core), naga))]
132#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
133pub use naga;
135
136pub use raw_window_handle as rwh;
139
140#[cfg(web)]
143pub use web_sys;
144
145#[doc(hidden)]
146pub use macros::helpers as __macro_helpers;