Skip to content

UWP UI application in Rust #53

Open

Description

@DJankauskas

Is it possible to create a uwp app with a ui with this library? If so can an example for that use case be added? If not what's preventing this: technical issues or something else?

Activity

  1. Boddlnagg commented on Jan 6, 2018

    @Boddlnagg
    Collaborator

    It's currently not possible, because creating a UI requires inheritance (you have to define at least your own subclass of Application, if I understand things correctly in https://blog.magnusmontin.net/2017/10/29/minimal-uwp-app/), and inheritance is not yet supported in winrt-rust.

    Since I also have never built a UWP UI App in any other language, I lack experience with this, which is why I haven't yet tackled this area in winrt-rust.

    Furthermore, I expect that rustc itself also needs some support for generating actual UWP Apps (e.g. for App package manifests), which isn't there yet, or at least has never been tried. Everything I have tested so far is bascially traditional "Win32"-Apps using some UWP APIs (since most UWP APIs outside the Xaml namespace can actually be used from Win32-Apps).

  2. Boddlnagg commented on Jun 13, 2018

    @Boddlnagg
    Collaborator

    Quick answer from my side: I don't know (because I've never used inheritance in UWP). Probably it's a rather large effort. Help appreciated!

  3. DJankauskas commented on Jun 14, 2018

    @DJankauskas
    Author

    Could you offer some pointers on understanding how inheritance is implemented in cppwinrt? I've used that library before so I'd be willing to explore how its implementation works.

  4. CarePackage17 commented on Jun 26, 2018

    @CarePackage17

    Rustc doesn't need to do anything .appx related - packaging is done with separate tooling, though integration with cargo would be nice.

    @DJankauskas, inheritance in C++ (and COM, which the Windows Runtime is built on) is implemented with vtables (pointers to virtual functions).
    There's a lot more going on in cppwinrt under the covers, a lot of plumbing is hidden away from the developer.

    That said, I'd also be interested in an effort like this. I think it would be pretty cool to have Rust running on HoloLens.

  5. Boddlnagg commented on May 18, 2019

    @Boddlnagg
    Collaborator

    Related: rust-lang/rust#60260 (UWP support for Rust)

  6. rpjohnst commented on May 18, 2019

    @rpjohnst

    Also related: https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/xaml-host-controls

    You can now (on new enough versions of Windows) use some amount of UWP UI outside of an appcontainer.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions