Skip to content

cubecl::wgpu::GraphicsApi returns non-reexported type Backend #1352

Description

@metasim

GraphicsApi::backend() returns wgpu::Backend, which is not re-exported. In cases where type inference is not available, users of the return value will have to separately add a dependency on wgpu a manually keep the version up to date with cubecl:

/// The basic trait to specify which graphics API to use as Backend.
///
/// Options are:
/// - [Vulkan](Vulkan)
/// - [Metal](Metal)
/// - [OpenGL](OpenGl)
/// - [DirectX 12](Dx12)
/// - [WebGpu](WebGpu)
pub trait GraphicsApi: Send + Sync + core::fmt::Debug + Default + Clone + 'static {
/// The wgpu backend.
fn backend() -> wgpu::Backend;
}

Proposed fix would be to add pub use wgpu::Backend to graphics.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions