blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Rendering & platform support

Open itsezc opened this issue 2 years ago • 11 comments

From reading the Dioxus docs and any resources I could come across (on Discord and the wider web), I understand that blitz (plans to) support the following platforms:

  • Desktop (Windows, Linux and MacOS)
  • Mobile (Android & iOS)
  • Bevy (among other game engines)

While this is an amazing list, I would be interested to know the following (for my own education):

  • Is the rendering immediate or retained?
  • Is there any planned support for the web via webgpu a potential use case would be building GUI heavy apps i.e. something similar to Unreal Engine's blueprint editor in Dioxus?
  • Given that web would be a supported platform via blitz, how would it address SEO related issues (if at all, even if it were through Dioxus)
  • Any intentions on targetting embedded platforms i.e. Raspberry Pi and some other / more niche platforms used in IoT where GUIs are present

I'm not an expert in renderers or vDOMs so excuse my ignorance, this issue is for me (and people alike) to get a better understanding of blitz and the role it'll play.

itsezc avatar Apr 01 '23 17:04 itsezc

From reading the Dioxus docs and any resources I could come across (on Discord and the wider web), I understand that blitz (plans to) support the following platforms:

  • Desktop (Windows, Linux and MacOS)
  • Mobile (Android & iOS)
  • Bevy (among other game engines)

I would be open to adding Bevy support, but currently it is not a priority.

While this is an amazing list, I would be interested to know the following (for my own education):

  • Is the rendering immediate or retained?

The whole screen is redrawn every frame, but the plan is to switch to partial screen updates at some point. The Virtual DOM (or your own framework) creates a retained tree of elements. From the elements Blitz creates a retained tree of computed styles and layout. When the styles and layout are rendered the whole screen is redrawn.

  • Is there any planned support for the web via webgpu a potential case use case would be building GUI heavy apps i.e. something similar to Unreal Engine's blueprint editor in Dioxus?

There is no plans to support web though Blitz, except potentially as a demo platform. For web rendering, you can use the Dioxus-web crate. This is the main reason Blitz renders normal HTML elements + attributes. HTML elements have better out of the box support for accessibility and SEO optimization. It should be possible to target web through native elements and Vello at the same time. This is also not supported by Vello.

  • Given that web would be a supported platform via blitz, how would it address SEO related issues (if at all, even if it were through Dioxus)

You can use Dioxus SSR to make Dioxus sites work with SEO.

  • Any intentions on targeting embedded platforms i.e. Raspberry Pi and some other / more niche platforms used in IoT where GUIs are present

There are no plans for no-std support, but targeting embedded platforms that are supported by rust could be interesting in the future. This again is limited by platforms Vello supports. Currently the focus is on building a stable platform for native applications on desktop and mobile, but once that is more complete this could be an area to look at.

ealmloff avatar Apr 01 '23 18:04 ealmloff

Thanks for that response, it provides a much greater insight into the ecosystem, though I'd like to advocate for definitely adding web as one of the primary targets (that is with WebGPU and not just DOM) for when you want to build the next Figma so I can see the benefit of having both rendering strategies.

@Demonthos is there a comparison sheet that has been compiled to view the difference between Blitz and other rendering engines such as UltraLight, WRY etc. and also perhaps the browsers so we can use that to track what features are available?

itsezc avatar May 15 '23 03:05 itsezc

For multi platform support is root font size reset supported with Blitz?


:root {
	font-size: 62.5%;
}

body {
	font-size: 1.6rem;
}

So I can use rem as units of 10

@Demonthos

badlanguage avatar May 17 '23 23:05 badlanguage

@Demonthos is there a comparison sheet that has been compiled to view the difference between Blitz and other rendering engines such as UltraLight, WRY etc. and also perhaps the browsers so we can use that to track what features are available?

I have a private tracking board with what Blitz supports. I'm working on making it public soon.

Currently, Blitz supports a tiny subset of the attribute/elements that you would find in a normal browser, but we are looking to expand these in the future. Right now, Blitz is only really usable for small demos. In the future it will support a larger subset of HTML, but it will likely never support the entire spec.

For multi platform support is root font size reset supported with Blitz?

Selectors are not implemented yet, but they are one of the things (along with https://github.com/DioxusLabs/dioxus/pull/940) that are required for widgets in Blitz, so they are planned.

ealmloff avatar May 17 '23 23:05 ealmloff

Thanks for opening up the tracking board and expanding on the topic.

In the future it will support a larger subset of HTML, but it will likely never support the entire spec.

Is there a list of features / elements that Blitz won't support, and the reasoning? I'm interested to know the what and why and see if there are any limitations for my projects.

itsezc avatar Jun 06 '23 01:06 itsezc

Is there a list of features / elements that Blitz won't support, and the reasoning? I'm interested to know the what and why and see if there are any limitations for my projects.

There isn't a set list of items that will not be implemented. As we implement more elements and attributes I expect there will be areas that will are both:

  1. Very rairly used in modern websites
  2. Have substantial performance or maintainability impacts for much more common use cases Which may not be implemented

ealmloff avatar Jun 06 '23 02:06 ealmloff