mamot.fr is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mamot.fr est un serveur Mastodon francophone, géré par La Quadrature du Net.

Server stats:

3.3K
active users

#iced

1 post1 participant1 post today

i've been using relm4 for a while and i'm really happy with it. i love the #elm architecture - your app's state is a struct (or object), your user interface is rendered by a function that takes your state and returns a tree of widgets (or similar), widgets emit messages, messages modify state. i find it so much cleaner and easier to wrap my head around than traditional imperative methods or MVVM.

what are some other nice cross-platform #desktop app frameworks that use this architecture? i'm mainly familiar with #relm4 and #iced in #rust. :boost_requested:

relm4.orgRelm4
Continued thread

Added gamma correction, and the ability to hook into the Vulkan context with your own widget.
In this case, it renders to the whole framebuffer, but brightens the widget's area.

The widget is like any other, so it requests a redraw every 16ms, just like any other animated widget via a `Subscription`.

#iced#rustlang#rust

pub fn update(&mut self, message: Message) -> Task<Message> {
match message {
Message::Count=> {
let (task, h) = Task::perform(
count(),
Message::ScriptEnded,
).abortable();
self.abort_js = Some(h.abort_on_drop());
return task;
}
Message::Stop => {
if let Some(_) = &self.abort_js {
self.abort_js = None;
}
}
...
}

async fn count(
) -> Result<(), MyError> {

for i in 0..10 {
println!("{i}");
sleep(Duration::from_secs(1));
}
Ok(())
}

Using #iced #rust
I don't know what I'm doing wrong but the task don't abort.

#rust #rustlang

I'm trying to make #rustyscript work with #iced-rs but it doesn't seems to want to play nice.

Specifically I want to need able to run a js script with rustyscript and keep the option to stop the script when I want. But Rustyscript Runtime doesn't play well with iced-rs' own concurrency mechanisms.

The other difficulty is I need to register rust function in the js runtime, and I don't find a way to do that using Workers.

I'm basically running circle around the problem... I got something to compile but the js execution thread crashes with this message :

Cannot start a runtime from within a runtime. This happens because a function (likeblock_on) attempted to block the current thread while the thread is being used to drive asynchronous tasks.

Iced (1988) [Degausser Video Blu-ray Promo Trailer]

#horror#Trailers#horrormovies#Iced – @DegausserVideo – A group of friends head off for a fun-filled getaway in the snowy mountains, where they’ve unexpectedly been offered a free stay at a luxury ski resort. Once they arrive at their cabin, however, the high spirits are soon dampened when they discover a newspaper […] …

#ad #horror #Iced #Trailers

horrornerdonline.com/2025/01/i

Been slowly working on a #libcosmic app. It's a presentation app for my ministry and church. I originally wrote it in #C++ and #QML, but have since rewritten part of the backend to #rust with the help of #CXX-QT. This still gave me a really tricky system and I decided to investigate rust ui libraries. Seeing #system76 develop #cosmic in rust with #iced, I decided to try it, and it's working quite nice thus far. Some rough edges, but I can't wait to see it come to fruition.

In his online book, Iced (the GUI library) explains that the Model-View-Update design pattern fits well with Rust because it is suited to purely functional languages. And libcosmic (based on Iced) in its own book goes even further: MVU adheres to Rust's “aliasing XOR mutability” rule².

BTW I realize that MVU is not limited to simple apps if associated with an async mechanism.

¹ book.iced.rs/architecture.html (see "The Elm Architecture")
² pop-os.github.io/libcosmic-boo

book.iced.rsArchitecture - iced — A Cross-Platform GUI Library for Rust


Ich habe am Wochenende auf meinem Gaming-PC mal #COSMIC installiert. COSMIC ist eine neue Desktop-Umgebung für #Linux. In #Rust programmiert, basierend auf die Rust-Bibliothek #iced. Ein paar Freunde von mir haben davon geschwärmt, und da kann ich ja nicht zurückstehen ;-)

Also schwupps auf dem Gaming-PC installiert, der von von #ArchLinux angetrieben wird. Entsprechende Pakete stehen bereit (siehe ArchWiki). Der Start war auch rasend schnell, und das Ding fühlte sich gut an. Bis sich nach einer kurzen Zeit das ganze System aufgehängt hatte.

Auf Fehlersuche war ich an dem Abend aber nicht so erpicht, also habe ich COSMIC wieder weg gemacht.