Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev

6 replies

programming.dev

Languages: Just Rust!

You got my attention.

fn app(cx: Scope) -> Element {
    let mut count = use_state(cx, || 0);

    render!(
        rect {
            height: "20%",
            width: "100%",
            background: "rgb(233, 196, 106)",
            padding: "12",
            color: "rgb(20, 33, 61)",
            label { 
                font_size: "20", 
                "Number is: {count}"
            }
        }
        rect {
            height: "80%",
            width: "100%",
            background: "rgb(168, 218, 220)",
            color: "black",
            padding: "12",
            onclick: move |_| count += 1,
            label { "Click to increase!" }
        }
    )
}

Oh, it's stringly-typed Rust.
Yeah, no thanks.

19
feddit.de

Native GUI library for Rust

Oh, you have my attention.

stringly-typed

Ummm....

simple click counter example doesn't work on my phone

Aw shit.

Project website

12

Seems pretty legit!

The live refresh seems cool, would love to try it out

4

You reached the end