How to provide wgpu instance while using iced winit infrastructure?

Hello,

I am writing a shadertoy app using rust-gpu and want to use iced for the ui.

I need control over the wgpu renderer.
Specifically I need to change some instance flags:

let mut instance_flags = wgpu::InstanceFlags::default();
// Turn off validation as the shaders are trusted.
instance_flags.remove(wgpu::InstanceFlags::VALIDATION);
// Disable debugging info to speed things up.
instance_flags.remove(wgpu::InstanceFlags::DEBUG);

I also need to setup some features:

let mut required_features = wgpu::Features::PUSH_CONSTANTS;
    if adapter
      .features()
      .contains(wgpu::Features::SPIRV_SHADER_PASSTHROUGH)
    {
      required_features |= wgpu::Features::SPIRV_SHADER_PASSTHROUGH;
    }

I found no way of doing that while using the iced winit infrastructure.

Is it possible to still use all the winit event loop stuff from iced while providing a renderer instance?

Otherwise I will just reimplement all the stuff based on https://github.com/iced-rs/iced/blob/master/winit/src/lib.rs#L133 and https://github.com/iced-rs/iced/blob/latest/examples/integration/src/main.rs which is very sad.

I was also wondering about that for basically the same use case (some live shader editor). Did make any progress on that matter?

I rewrote the whole iced winit infra. Passing the shader modules around is quite painful in iced. Ultimately my live rust GPU shader editor is working but I am exploring options to switch to a different or custom GUI library. I like the elm model on paper but struggle to make it work in practice.

I wish you the best of luck. If there is an option in iced to make that easier, I might revisit it.