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

Remove the Skia/Silk display hard dependency from the Linux/RPi platform (and make it optional) #824

Open
HakanL opened this issue Feb 12, 2025 · 3 comments
Assignees

Comments

@HakanL
Copy link

HakanL commented Feb 12, 2025

In my case I have an existing project using the .NET IoT package (https://github.com/dotnet/iot) running a headless Raspberry Pi. I wanted to take advantage of the great library of devices in Meadow Foundation, especially the ST7789 display that I wanted to use for status information in my project. Since your libraries use interfaces all over, which is awesome, I was thinking it wouldn't be too hard to just create my own RPi adapter without the display (Skia/Silk) dependencies (since I don't have a display, they are of no use to me), plus I wanted to use the existing .NET IoT code as well. But unfortunately the RaspberryPi implementation is inherited from the Linux class, and the dependency for display is in that base class.
What I ended up was rolling my own implementation, which works fine, but I wanted to suggest that you separate the display (Skia/Silk) parts from the main Linux/Rpi class so it can just be added if needed.
I'm pretty sure a lot of people who want to use the Foundation devices don't have/need the display parts. Here's a link to my adapter if someone wants to marry Meadow Foundation with .NET IoT: https://github.com/HakanL/Meadow.DotNetIoT

@adrianstevens
Copy link

Hi @HakanL thanks - this is very cool!

I'll talk with @ctacke about potential solutions and we'll follow up.

@ctacke
Copy link
Contributor

ctacke commented Feb 19, 2025

I've pulled it out to the LinuxDesktop which is probably where it should have been in the first place. That said, it's still a ref because all of the Linux implementations are in that same assembly. I'm thinking that to decrease this, maybe we should have a Linux assembly, and then derived assemblies for each target platform, so RPi, BeagleBone, Jetson, Desktop, etc all become individual assemblies.

@HakanL
Copy link
Author

HakanL commented Feb 19, 2025

That sounds good, but yeah, ultimately it would be nice to not have that dependency in the assembly, as IMHO Skia in this context is used for debug/development, and not often in a production environment (however the RPi using IO via Meadow could be used in production, at least that's my plan).

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

No branches or pull requests

4 participants