Ribir: Non-intrusive GUI framework for Rust/WASM

(github.com)

44 points | by adamnemecek 5 hours ago ago

4 comments

  • rubymamis 4 hours ago

    > Unlike common object-oriented GUI frameworks, Ribir widgets do not need to inherit a base class or hold a base object. It is a pure composition model

    I'm really not sure how this "composition" is any different to the usual inheritance you see in frameworks like QML *in practice*.

    This in Ribir:

    ```

    Column {

            align_items: Align::Center,
    
            item_gap: 12.,
    
            @H1 { text: "Todo" }
    }

    ```

    Would be this in QML:

    ```

    ColumnLayout {

            spacing: 12
    
            Text {
                    Layout.alignment: Qt.AlignHCenter
    
                    text: "Todo"
    
                    font.pointSize: 17
            }
    
    }

    ```

    • pshirshov 3 hours ago

      Generally, many forms of inheritance do not compose, but I'm not sure that makes these primitives composable.

  • the__alchemist 4 hours ago

    How does this compare to EGUI, GPUI, and Slint?

    I like the idea of using macros to clean syntax; am writing some for EGUI right now to make colored text easier.

    • mwcampbell 3 hours ago

      This may not be what you're after, but note that egui and Slint have accessibility support (at differing levels of completeness), e.g. for blind people using screen readers, while Ribir and GPUI do not.