Rialight new ideas

A few months ago I've played with internationalization and file system APIs and created small crates for the ecosystem. They're not perfect, but I may reuse somethings I've learned from them for a better version.

I've updated the README of Rialight, with some new ideas, for instance:

  • Graphics API
    • Reactive Components
    • Nodes
    • Skins (node skinning)
  • Gaming API
    • Entity-Component-System

Ideas for other things for now are the same, like the File System API.

To clarify, Node will use the composition pattern and Node will hold common properties like visibility or parent, but under the hood it also holds an union (each variant as a box, so union has like an usize size). For example, a Node can be a button, a modal, and so on.

This also means an user can't create custom Nodes since Rust has no inheritance, but that's not really a problem:

  • Rialight could try to have as many nodes as possible to cover all use-cases. If any kind of node overloads the project, that node kind can be put behind a Cargo feature.
  • Rialight would support reactive components.

As a last resort, you can wrap nodes into unrelated types, but I don't think this will be necessary.

I don't like much existing frameworks due to limitation and flexibility, as I looked at their API at https://docs.rs. Bevy looks interesting, but I'm not sure ECS is easy for programming UI.

I'm not saying I'll create this framework, just sharing ideas for now...

In fact, the set of DOM elements is also limited and can't be extended. There are custom HTML elements, but AFAIK they don't share the same properties as the limited set of DOM elements.

I've added more too to the README as it lacked details.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.