1#![doc = document_features::document_features!()]
7#![no_std]
18#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
19#![doc(html_logo_url = "https://raw.githubusercontent.com/gfx-rs/wgpu/trunk/logo.png")]
20#![warn(
21 clippy::alloc_instead_of_core,
22 clippy::allow_attributes,
23 clippy::std_instead_of_alloc,
24 clippy::std_instead_of_core,
25 missing_docs,
26 rust_2018_idioms,
27 unsafe_op_in_unsafe_fn
28)]
29#![cfg_attr(not(send_sync), allow(clippy::arc_with_non_send_sync))]
31#![cfg_attr(not(any(wgpu_core, webgpu)), allow(unused))]
32
33extern crate alloc;
34#[cfg(std)]
35extern crate std;
36#[cfg(wgpu_core)]
37pub extern crate wgpu_core as wgc;
38#[cfg(wgpu_core)]
39pub extern crate wgpu_hal as hal;
40pub extern crate wgpu_types as wgt;
41
42mod api;
49mod backend;
50mod cmp;
51mod dispatch;
52mod macros;
53pub mod util;
54
55#[cfg(custom)]
68pub use backend::custom;
69
70pub use api::*;
71pub use wgt::{
72 AdapterInfo, AddressMode, AllocatorReport, AstcBlock, AstcChannel, Backend, BackendOptions,
73 Backends, BindGroupLayoutEntry, BindingType, BlendComponent, BlendFactor, BlendOperation,
74 BlendState, BufferAddress, BufferBindingType, BufferSize, BufferTextureCopyInfo,
75 BufferTransition, BufferUsages, BufferUses, Color, ColorTargetState, ColorWrites,
76 CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, CopyExternalImageDestInfo,
77 CoreCounters, DepthBiasState, DepthStencilState, DeviceLostReason, DeviceType,
78 DownlevelCapabilities, DownlevelFlags, DownlevelLimits, Dx12BackendOptions, Dx12Compiler,
79 DxcShaderModel, DynamicOffset, Extent3d, Face, Features, FeaturesWGPU, FeaturesWebGPU,
80 FilterMode, FrontFace, GlBackendOptions, GlFenceBehavior, Gles3MinorVersion, HalCounters,
81 ImageSubresourceRange, IndexFormat, InstanceDescriptor, InstanceFlags, InternalCounters,
82 Limits, MemoryBudgetThresholds, MemoryHints, MultisampleState, NoopBackendOptions, Origin2d,
83 Origin3d, PipelineStatisticsTypes, PollError, PollStatus, PolygonMode, PowerPreference,
84 PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology,
85 PushConstantRange, QueryType, RenderBundleDepthStencil, RequestAdapterError,
86 SamplerBindingType, SamplerBorderColor, ShaderLocation, ShaderModel, ShaderRuntimeChecks,
87 ShaderStages, StencilFaceState, StencilOperation, StencilState, StorageTextureAccess,
88 SurfaceCapabilities, SurfaceStatus, TexelCopyBufferLayout, TextureAspect, TextureDimension,
89 TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType,
90 TextureTransition, TextureUsages, TextureUses, TextureViewDimension, Trace, VertexAttribute,
91 VertexFormat, VertexStepMode, WasmNotSend, WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT,
92 COPY_BYTES_PER_ROW_ALIGNMENT, MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT,
93 QUERY_RESOLVE_BUFFER_ALIGNMENT, QUERY_SET_MAX_QUERIES, QUERY_SIZE, VERTEX_STRIDE_ALIGNMENT,
94};
95#[cfg(web)]
98pub use wgt::{CopyExternalImageSourceInfo, ExternalImageSource};
99
100#[cfg(wgpu_core)]
103#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
104pub use ::wgc::naga;
106#[cfg(all(not(wgpu_core), naga))]
109#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
110pub use naga;
112
113pub use raw_window_handle as rwh;
116
117#[cfg(web)]
120pub use web_sys;
121
122#[doc(hidden)]
123pub use macros::helpers as __macro_helpers;