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

Rendering & platform support #25

Open
itsezc opened this issue Apr 1, 2023 · 6 comments
Open

Rendering & platform support #25

itsezc opened this issue Apr 1, 2023 · 6 comments

Comments

@itsezc
Copy link

itsezc commented Apr 1, 2023

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.

@ealmloff
Copy link
Member

ealmloff commented Apr 1, 2023

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.

@itsezc
Copy link
Author

itsezc commented May 15, 2023

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?

@badlanguage
Copy link

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

@ealmloff
Copy link
Member

@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 DioxusLabs/dioxus#940) that are required for widgets in Blitz, so they are planned.

@itsezc
Copy link
Author

itsezc commented Jun 6, 2023

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.

@ealmloff
Copy link
Member

ealmloff commented Jun 6, 2023

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

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