-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support Blazor Hybrid on Linux/Ubuntu #11738
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
@Redth, @davidortinau what should this be duped against? I've learned that there are multiple issues now tracking Linux support in MAUI. |
@jayschmelzer I'd like to request this issue gets on your radar for tracking. Support of Linux here is critical for us. Thanks. |
@RChrisCoble - just to check: are you asking for .NET MAUI Blazor Hybrid on Linux, or specifically BlazorWebView? That is, much like we have BlazorWebView for WPF and WinForms, we would have this full suite:
|
@Eilon! Hope you're doing well. I'll answer with our desired UC to be clear. We want to take our Blazor application and run it in a Blazor Hybrid deployment on Windows, iOS, Android, and Linux. I don't believe we care about the shell technology hosting the BlazorWebView (WPF, WinForms, or MAUI). I'm assuming:
|
Alright, so right now you want "a way to run Blazor Hybrid as a Linux GUI app". Whether you have access to the various .NET MAUI APIs (such as Maui Essentials), or any other native UI controls, is not a critical factor for you? You'd still have access to everything that .NET itself supports in Linux, like file system, networking, and most other |
Right, no native GUI. We’re not using Maui essentials (yet), but I suspect we might introduce that in iOS and Android usages for mobile device UC’s, but that wouldn’t be required on Linux. So, just as you described, a “Blazor Hybrid as a Linux GUI app”. Now if you could also ensure it works with EmbeddedLinux using FrameBuffer rendering that would be ideal. (Sarcasm) |
We'd love to be able to support Linux |
For folks interested in Blazor Hybrid Linux support, could you share with us what sort of Linux device hardware you need to support? Is this for users running Linux on a PC/laptop? Or is this for some sort of embedded scenario? Are these devices indicative of a particular market or user base that you're trying to address where Linux is particularly important? Do you expect to have a significant user base running your apps on Linux or is this more about being able to say that can run on Linux even though you don't expect significant usage? The more details you can share on the specific hardware and target audience the better. Thanks! |
Thanks @danroth27. For our UC's, we're targeting embedded with attached screens running some version of Ubuntu. We did some POC's and were able to run our .NET graphic rendering engine with SkiaSharp down at the FrameBuffer level, but that required us consuming various components from Avalonia along with using Avalonia's SkiaSharp branch. The business decided that wasn't feasible for the long term from an investment standpoint as that tech stack didn't include any Blazor support. We have some future POC's lined up to see how "small" we can get, and for now that requires a full browser like Edge to be present, since the application is ultimately Blazor. There would need to be backend services for telemetry feeding the browser client in this scenario. I believe we can get even smaller from a performance and memory footprint standpoint with a Blazor Hybrid app, also giving us access to the local resources on the device, which we also need. (I realize Edge is still in play there with Blazor Hybrid, but the .NET code is outside and not WASM based). Performance is always high priority in our UC's. How "small" we can ultimately get will drive the hardware requirements, so I'm a bit in a chicken and egg situation there. The "devices indicative of a particular market or user base" is local control of machines using an "HMI" (Human Machine Interface). We're looking to support large workloads all the way to small(ish) devices with the same code base and UI layer. Blazor baby! |
All this can probably be better summarized by stating the following obvious IOT type scenario: I build my IOT Visualization solution in the cloud via SaaS tooling then deploy to the Edge. The Edge could be robust industrial grade PC's all the way down to embedded devices. Our industry is NEVER without local control (the HMI part). No customer will accept plant operations going down if the internet connection is severed. |
I want this for HMI imx8mplus scenarios. I.e. Arm64. Arm32 would nice but arm64 a minimum. |
I'm in China. We have many Linux PC users, and many embedded development needs Linux. I hope maui can support it |
jsuarezruiz#37 seems to mention BlazorWebView compiling |
yes we use linux as the main company system for now. blazor wasm is slow, and lack of local device controll, so adding blazorwebview feature is a great news for me, and hopefully in the near future, maui controlls and essentials will also be added for linux users. |
we are using ubuntu linux desktop for our professional work monitor with gnome installed. So blazorwebview like in maui and wpf is needed. and it would be great if it can be added as a controll in Avalonia. |
Ubuntu amd64. It's hard to determine how big the usage will be right now. |
Professionally, we would consider deploying our already-existing Blazor WASM as a standalone application on cheap Linux-based ARM devices (IE Raspberry Pi or the like). Performance is paramount here as the application handles realtime data, and it tends to struggle in the browser on the lower power devices. In my personal life I'd use it for many projects. Off the top of my head would be to support a Blazor Maui app I wrote to manage/monitor the power electronics on a Tesla-powered go cart I built. Currently I must use an android device, but this would allow me to use a Raspberry Pi instead. I'd also do something similar with the cars I build, where I could read metrics from their ECU over CAN bus to monitor various metrics. Would be particularly helpful on an EV build I'm considering doing. |
as cat is without jit mode, appkit is also requried, also. |
This comment has been minimized.
This comment has been minimized.
@densen2014 what exactly is the purpose of your post? Do you want to say there is no need to implement that in MAUI cause BlazorHybrid.Linux is the better alternative? I thought this issue is about implementing a BlazorWebView in Maui, like Microsoft.AspNetCore.Components.WebView.WindowsForms, supported by Microsoft, and provided in this Project. |
This comment has been minimized.
This comment has been minimized.
@densen2014 as far as i can read, this topic is about supporting Blazor in Maui on Linux, and not about "if someone want to try this or that or those". BTW, you already told us that you use SpiderEye in a post above, and that you are happy with it. |
@danroth27 are you interested on a PR implementing Blazor Hybrid support for Linux separately from .NET MAUI support for Linux? I could extract it from this PR: |
@lytico Thank you for offering this contribution, but we intentionally rely on .NET MAUI for our cross-platform host. We're not setup to maintain our own Linux based host on the Blazor team. But we welcome any community effort to maintain a Linux host for Blazor as a separate community driven project. |
lol microsoft love linux , what a joke |
@danroth27 I appreciate the clarity. We as a community of users are in a space were we need to select a product vs alternatives like Flutter. And while Linux is not a huge market, this push decisions away from .NET, for rationales of product constraints but also when developers love Linux machines. I hope this is a funding based decisions and not a fundamental disbelieve in the Linux use case or, even worse, a strategic pro Windows decision. |
@densen2014 thank for the pointing out such an alternative @danroth27 we completely understand but waiting for MAUI is also not the answer. Blazor is doing really good, after united project and then later multithreading (.NET 9) it will do even better but still linux part is missing. It would be great to see at least some experimental attempt from your team. I know there are no resources but your team knows the technology behind blazor best and I think they would find also best option for blazor to be able deliver on linux. |
@tthiery This is entirely a funding-based decision. I'm strongly supportive of supporting Linux. We already support Linux for server scenarios and multiple non-Windows platforms on the client. But with .NET MAUI we first need to address the issues we have with the existing platforms that we support before expanding to more platforms. On the Blazor team we are similarly stretched with handling our existing frontend web development scenarios. Stretching ourselves further on either front risks significant quality issues that no one wants. |
More and more baseless excuses. No software is 100% complete. Not once did you ask for community support, as were the requests for Linux (Ubuntu) support. A Linux support fork was created by a user and it has been more than 1 year and nothing from Microsoft has supported the project or even incorporated it into the main project. Why didn't Microsoft already support the community 100% when MAUI wasn't even released yet? Because they didn't give all the support and support we needed to build at least the Linux base and the community could help with the controls. |
Forgive me that I haven't done my research on this, so maybe a stupid question. Wouldn't it be possible to have @lytico 's solution on top of the official .NET package? Obviously, it would be needed to maintain it constantly to be compatible with MS's base DLLs. Linux users would install the official .NET 8 the official way, then from a ppa repo install lytico's extensions or have it as a drop-in extension with the application (self-contained publish) (maybe even by overwriting some of MS's DLLs, or patching some of them via reflection or something). Sounds kind of a hacky solution, but if it works, that's all we can do. |
Can't it be community maintained just like Xamarin.Forms? |
You mean dead? |
Problem maybe is that modern computers(among browsers) could have incorporated wasm stack and then download size could be not so big(like there is growing support for libwebkit even by Microsoft). Today's browsers are mostly based on blink/webkit stack and there is no built in support for non-HTML languages, but adoption of WASM are headed into this area although DOM browser understanding of objects are archaic. WASM is more low level and lower is only browser or operating system. If there is DOM interface with blink/webkit interpretation, it is plugin for DOM coded in blink/webkit. If there is business logic coded in .NET and compiled for WASM, but intended for some platform for better platform goodies, directly compiling via Visual Studio something is question because there is already a lot of support for something in VS... If Microsoft approach or something also related like JetBrains or Idea special code support could bring some more efficient programmers approach for code development(because lengthy and talkative Visual Studio code development is disaster by some way), then it could bring more summer light for question in the original Issue of this topic, but probably also a specialized development when something more corporative is needed and JetBrains, Idea or even Visual Studio is not so helpful 👯 There is already a lot of Visual, Programmatic and Other extensions in VSCode, but more functional Visual Studio with (some) paid plugins is not so related with its VSCode with broader(but lighter) ecosystem and today's need of programmers for things like JavaScript or npm also lead to a lot of plugins for VSCode, but paid extension in Visual Studio are not among them when there are some nice compilation something in npm world which won't led for Visual Studio environmental development for efficient code writing by Programmers when there are hundreds thousands of projects in big corporations like Microsoft or Google, but paid plugins in VS, VSCode, Idea for something which could paid development costs for something like compiler development, but also for some architectonical changes when big corporations are making their own hardware because normal hardware vendors have troubles with themselves is also a mark of problems with such Visual Studio plugins... |
maybe when ms says community support on linux they meant something like photino.blazor and thats it. at least there is something that works today. |
Hi, To achieve it on Linux, we forked the .NET MAUI's BlazorWebView from Mac Catalyst, and rewrote it using GTK. It took me about 3 evenings to do so (doing this project in my spare time). It's not perfect, but it works! Some challenges I got was having to dive into how to handle the clipboard myself, move and resize the window programmatically. Here is the Linux-specific code of this app: https://github.com/DevToys-app/DevToys/tree/main/src/app/dev/platforms/desktop/DevToys.Linux More specifically:
I'm hoping this can help anyone trying to target Linux while there's no official support on MAUI. |
I think this is doing the same as above: |
thx veler.. your code is very useful. |
Hello ASP.NET & MAUI Team! @danroth27, @davidortinau, @Eilon
Now that Blazor Hybrid has gone through a good stabilization and performance release with .NET 7, I'd like to put a request in to consider Blazor Hybrid support on Linux with Ubuntu. The Edge browser for Linux has been released and stabilized for about a year now.
For our usages, we're standardizing on the Blazor Hybrid/MAUI "One code base and one UI layer" vision by taking our large desktop WPF application first to a SaaS Blazor WASM application then deliver that same application on Mobile (iOS/Android), then onto the native desktop application on Windows and we know already we need to get to smaller footprint/panel devices which run Linux.
We need the smallest memory/CPU profile possible on these Linux devices, so we'd far prefer to run the .NET business logic code natively on the device instead of running that on WASM.
The text was updated successfully, but these errors were encountered: