Skip to content

iced_widget has overly eager dependency on iced_renderer #3269

@kay-lambdadelta

Description

@kay-lambdadelta

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

The iced_widgets library has a ovely dependency on iced_renderer, which it does use some of its functionality conditionally, but the iced_renderer library has a compile_error when it does not have wgpu and/or tiny-skia features enabled on it (as I believe it is meant to be glue code for official renderers), making iced difficulty to use without the umbrella crate and with usage of the library that has completely custom renderers (such as for embedded applications) impossible unexpectedly.

A workaround would be to enable tiny-skia to make it happy but the tiny-skia backend has a unconditional dependency on softbuffer which limits iced to platforms winit can run on (more or less).

What is the expected behavior?

A subset of renderer independent code in iced_widgets should compile regardless of what renderer(s) are detected to be present, including none, for users who wish to take full control of how iced is operated.

Version

crates.io release

Operating System

Linux

Do you have any log output?

error: Cannot compile `iced_renderer` in release mode without a renderer feature enabled. Enable either the `wgpu` or `tiny-skia` feature, or both.
  --> /home/<username>/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/iced_renderer-0.14.0/src/lib.rs:53:5
   |
53 | /     compile_error!(
54 | |         "Cannot compile `iced_renderer` in release mode \
55 | |         without a renderer feature enabled. \
56 | |         Enable either the `wgpu` or `tiny-skia` feature, or both."
57 | |     );
   | |_____^

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions