1226
30
1227
36
1228
5
1229
12
1230
11
1231
20
This Week in Rust 505 (this-week-in-rust.org)
1232
18
1233
42
1234
20
submitted 3 years ago* (last edited 3 years ago) by van2z@programming.dev to c/rust@programming.dev

I just attempted to write up a simple Minesweeper game with Iced. No bells or whistles, but it works:

https://github.com/veniamin-ilmer/minesweeper

On one hand, I find it pretty cool I built a clear cross platform GUI with actual functionality, within only 200 lines of code.

On the other hand, I can't help but see how inefficient it seems. If I ever need to modify any of the objects, I need to redraw all of them. The structure of the view method makes me think it is very difficult for Iced to maintain a "virtual DOM" to only make delta changes.

Am I wrong? Is there a more efficient way to do this in Iced?

Edit: I just found this - https://github.com/iced-rs/iced/pull/1284

As the library matures, the need for some kind of persistent widget data (see #553) between view calls becomes more apparent (e.g. incremental rendering, animations, accessibility, etc.).

If we are going to end up having persistent widget data anyways... There is no reason to have impure, stateful widgets anymore!

So it seems like Iced plans to have an internal "persistent widget storage", which in abstracted away from the user. But it is quite unclear to me how they would accomplish this, considering the view method doesn't provide an ID for any of its objects, so it would not be easy for Iced to determine the difference between updates.

1235
9
Runtime Profiling in Rust (programming.dev)

I've been trying to find something that allows me to see performance visualizations in my rust programs, but I haven't found any so far. I'm looking for something that's like SnakeViz in Python, but for Rust. If there's a better way to get about doing this, I'm all ears.

1236
10
Durable Incrementality (rust-analyzer.github.io)
submitted 3 years ago by LGUG2Z@lemmy.world to c/rust@programming.dev
1237
26
1238
17
1239
3
submitted 3 years ago by djtech@lemmy.world to c/rust@programming.dev

crosspostato da: https://lemmy.world/post/1916287

Hi everybody, I'm new to Rust.

So, I have a struct Panel which contains a data widget which implements the trait Widget I have to implement a function for Panel that uses another function that requires a type that implements Widget.

I tried Box<T>, Rc<T>, Box<dyn Widget, &T, but nothing, always compiler errors.

How can I fix this?

1240
23
This Week in Rust 504 (this-week-in-rust.org)
1241
33

Lib.rs has previously been editorializing the crates within the search algorithm on their site based on their own personal preference. However, they recently have taken it a step too far in labeling the bitcoin repo as unmaintained despite active development taking place for the past several years. Several others have also taken similar actions.

1242
4
submitted 3 years ago by teolan@lemmy.world to c/rust@programming.dev
1243
23
Rustc Trait System Refactor (blog.rust-lang.org)
1244
265

Quoting the author

I’ve starting working on a lemmy front end called lemmy-ui-leptos using leptos, a Rust UI framework with isomorphic support, and tailwind + daisyUI for the component styling. This could eventually replace the frankenstein’s monster that lemmy-ui has become.

1245
9
1246
24
1247
27

From the release notes:

We are happy to release the new version of ratatui mouse, a community-maintained fork of tui.

In this version, we have introduced a new Scrollbar widget and enhanced the functionality of existing widgets like Block and Barchart. We have also made significant improvements to the stylization/widgets API, ensuring a smoother experience when creating TUIs. Additionally, we have addressed various bugs and implemented enhancements to optimize the overall user experience in TUI development.

Here is a blog post highlighting the prominent new features and providing practical examples of their usage: https://blog.orhun.dev/ratatui-0-22-0

1248
13
Rust Analyzer Changelog #190 (rust-analyzer.github.io)
1249
16
Getting rustc to use AVX2 SIMD (alexheretic.github.io)
1250
6

Given a regex, generate all (potentially infinite) possible inputs that match the pattern.

view more: ‹ prev next ›

Rust

8252 readers
30 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS