Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET MAUI #7

Open
Dan-Banfield opened this issue Jul 8, 2023 · 8 comments
Open

.NET MAUI #7

Dan-Banfield opened this issue Jul 8, 2023 · 8 comments

Comments

@Dan-Banfield
Copy link

Would love a .NET MAUI implementation!

@hansmbakker
Copy link

There is work in progress at https://github.com/jsuarezruiz/rive-maui

@hansmbakker
Copy link

hansmbakker commented Apr 5, 2024

@csmartdalton could you say something about MAUI (including iOS and Android) being or not being on the roadmap for Rive?

@csmartdalton
Copy link
Collaborator

@hansmbakker thank you for the request. We have not had the staff for this work yet. We are just now wrapping up a round of hiring on the runtime team, so I hope things can change soon, but for now it isn't explicitly on the roadmap. Until that time, we will gladly accept contributions from the community to the existing C# project!

@hansmbakker
Copy link

hansmbakker commented May 3, 2024

@csmartdalton thank you for the feedback!
While probably following the C++ approach is better performing, getting it to compile properly turned out a blocker (I documented my attempts in jsuarezruiz/rive-maui#1). Since Rive "owns" the build process of rive-native, I expect that somebody at Rive could solve this.

At least for the time that there is no official Rive MAUI library, I helped @matmork build a library using the Android and iOS packages - see https://github.com/matmork/rive-maui.

@csmartdalton
Copy link
Collaborator

That work looks awesome @hansmbakker! It's fun to see Rive running on a MAUI app.

Our current top focus is to get the Rive renderer enabled by default on iOS & Android, and that should have some significant impacts on size and speed for you as well, since you're using those packages.

Longer term it would be very cool to have more native support on MAUI. Which graphics APIs does MAUI use? Is it Metal & Vulkan? Does it also target desktops with DX?

@hansmbakker
Copy link

Longer term it would be very cool to have more native support on MAUI. Which graphics APIs does MAUI use? Is it Metal & Vulkan? Does it also target desktops with DX?

@csmartdalton that sounds good!

Regarding the graphics APIs - I understand you want to use a native acceleration layer rather than something like Skia?

MAUI is just .NET abstraction layer over the underlying platforms so I would say it should be possible (you can create native views and pass data to/from them).

@csmartdalton
Copy link
Collaborator

I understand you want to use a native acceleration layer rather than something like Skia?

This is correct. We have developed our own renderer that is custom made for optimal performance and memory usage with Rive content. Once we finish deploying the renderer everywhere, we will begin releasing features that don't exist on other renderers. So long term, you will want to get on the Rive renderer.

This is all open source and currently supports Metal, OpenGL, and DX11, with Vulkan coming soon. iOS is the closest to completion, with a full switch to the Rive renderer expected in the next month or two. If you have time to experiment, you may want to try compiling in rive-app/rive-renderer to your iOS and Android backends instead of pulling in the high level runtimes. On the Desktop side, the rive renderer will also allow us to drop the dependencies on SkiaSharp and ANGLE, which will lower the package size from about 15MB down to about 1MB.

@hansmbakker
Copy link

@csmartdalton those benefits sound really good. In https://github.com/jsuarezruiz/rive-maui, there is work already to adapt your own https://github.com/rive-app/rive-sharp to MAUI but that only covers Windows.

That work could be a good basis to move to your Rive renderer, and you could possibly merge the code of the two repositories. Support for the other platforms will require some more work, and I think especially the premake5 / c++ ecosystem requires some specific experience to get it to work.

Given that I could not get the toolchain to work (as shared in jsuarezruiz/rive-maui#1) needed to compile the native library, I focused on working with @matmork to reuse the prebuilt Android/iOS libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants