Skip to content

"Blessed" way to do things out of winits scope? (winit-extras) #2160

Open

Description

@madsmtm

There are a lot of things out of winit's scope that are useful (and maybe expected by most people that we provide), here's a few examples I've stumbled across, though there are many more:

The readme already notes this, and directs users to various graphics libraries, but these are not always what the user wants (or their graphics library may not support it).

It has been suggested we make a winit-extras crate or similar under the @rust-windowing umbrella (name up for bikeshedding), to house these components; this would help us with:

  • Providing examples of usage
  • Ensuring our APIs actually allow external crates to hook in to the functionality they need (we're working towards this, see Platform-specific event callbacks #2120)
  • Helps keeping these extra features up to date with the latest winit version
  • In the cases where we depend on an external library for this, this "blesses" that library, providing a more consistent user experience (currently there are many clipboard libraries out there; it would be nice if the ecosystem could converge on a single one)

The alternative is just to make crates for each of these things, and document them in the wiki (though for some of the smaller features like file open events it seems kinda dumb).

Activity

  1. added
    S - docs
    C - needs discussion
    D - average
    S - meta
    on Jan 23, 2022
  2. madsmtm commented on Jan 23, 2022

    @madsmtm
    MemberAuthor

    Third alternative is to simply increase the scope, though that brings other problems (such as not having enough maintainer time to support it and general feature creep) - though creating a new crate under the @rust-windowing umbrella also kinda exhibits these problems...

  3. tinaun commented on Jan 28, 2022

    @tinaun
    Contributor

    note that the tauri maintainers have already forked winit to add menus / clipboards etc in tao

  4. notgull commented on Dec 18, 2022

    @notgull
    Contributor

    I would, personally, support this. I was actually about to make my own extension crate to do this, but I feel having an official endorsement from @rust-windowing would boost its legitimacy.

  5. parasyte commented on Mar 11, 2023

    @parasyte

    There are multiple crates trying to offer various desktop environment features that winit lacks. I often find myself questioning why these need to be separate from the window management library, and what value it has. IMHO, any of these are obvious candidates for inclusion in a winit-extras crate:

  6. kchibisov commented on Mar 11, 2023

    @kchibisov
    Member

    Desktop notifications in any form are out of scope, they don't require the windowing system in the first place for what I know.

    Tray is the same thing I guess, though might not be entirely. Don't want to deal with it inside the winit though.

    I'm not sure about what type of dialogs are you talking about, but such usually is a part of the GUI toolkit, the dialog is a regular window, so it's all out of scope for winit, I'd say.

    Winit should collect essential features which is hard to get right in such 3d party crates, we're not the GUI toolkit, but the windowing library, you built your toolkit on top of it.

  7. parasyte commented on Mar 11, 2023

    @parasyte

    Well then it's a good thing this ticket is for tracking "things out of winits scope".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionD - averageS - docsS - meta

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions