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(missing_docs, rust_2018_idioms, unsafe_op_in_unsafe_fn)]
20
21mod api;
28mod backend;
29mod context;
30mod macros;
31mod send_sync;
32pub mod util;
33
34#[allow(unused_imports)] use context::Context;
42use send_sync::*;
43
44type C = dyn context::DynContext;
45#[cfg(send_sync)]
46type Data = dyn std::any::Any + Send + Sync;
47#[cfg(not(send_sync))]
48type Data = dyn std::any::Any;
49
50pub use api::*;
57pub use wgt::{
58 AdapterInfo, AddressMode, AstcBlock, AstcChannel, Backend, Backends, BindGroupLayoutEntry,
59 BindingType, BlendComponent, BlendFactor, BlendOperation, BlendState, BufferAddress,
60 BufferBindingType, BufferSize, BufferUsages, Color, ColorTargetState, ColorWrites,
61 CommandBufferDescriptor, CompareFunction, CompositeAlphaMode, CoreCounters, DepthBiasState,
62 DepthStencilState, DeviceLostReason, DeviceType, DownlevelCapabilities, DownlevelFlags,
63 Dx12Compiler, DynamicOffset, Extent3d, Face, Features, FilterMode, FrontFace,
64 Gles3MinorVersion, HalCounters, ImageDataLayout, ImageSubresourceRange, IndexFormat,
65 InstanceDescriptor, InstanceFlags, InternalCounters, Limits, MaintainResult, MemoryHints,
66 MultisampleState, Origin2d, Origin3d, PipelineStatisticsTypes, PolygonMode, PowerPreference,
67 PredefinedColorSpace, PresentMode, PresentationTimestamp, PrimitiveState, PrimitiveTopology,
68 PushConstantRange, QueryType, RenderBundleDepthStencil, SamplerBindingType, SamplerBorderColor,
69 ShaderLocation, ShaderModel, ShaderStages, StencilFaceState, StencilOperation, StencilState,
70 StorageTextureAccess, SurfaceCapabilities, SurfaceStatus, TextureAspect, TextureDimension,
71 TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType,
72 TextureUsages, TextureViewDimension, VertexAttribute, VertexFormat, VertexStepMode,
73 WasmNotSend, WasmNotSendSync, WasmNotSync, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT,
74 MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT, QUERY_RESOLVE_BUFFER_ALIGNMENT, QUERY_SET_MAX_QUERIES,
75 QUERY_SIZE, VERTEX_STRIDE_ALIGNMENT,
76};
77#[cfg(any(webgpu, webgl))]
80pub use wgt::{ExternalImageSource, ImageCopyExternalImage};
81
82#[cfg(wgpu_core)]
91pub use ::wgc as core;
92
93#[cfg(wgpu_core)]
97pub use ::hal;
98
99#[cfg(wgpu_core)]
102#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
103pub use ::wgc::naga;
105#[cfg(all(not(wgpu_core), naga))]
108#[cfg_attr(docsrs, doc(cfg(any(wgpu_core, naga))))]
109pub use naga;
111
112pub use raw_window_handle as rwh;
115
116#[cfg(any(webgl, webgpu))]
119pub use web_sys;