New - some basics

Hello a few questions as a newbie
First of all, have a happy new year
Hello Word program is running :slight_smile: I read the book very briefly (only a few headings)
Eclipse IDE is not running (doesn't matter)
Come from Pascal, Java, Python -
I would like to use Rust for ESP, raspberry and PC and want to go straight to IOT.
So much for prehistory.
So what I need: Threads / multitasking, Event Programming (Vertx), GUI (Qt - I've already found it as Rust) and TCP (http and mqtt :slight_smile:
What I haven't discovered yet is Thrad and event handling
As a reminder: 4 hours of rust experience :slight_smile:
is everything possible with rust :-)?


For threading you can use std::thread::spawn() to spawn threads.

Handling events will totally depend on which GUI framework you use. I'd advise reading through their API docs because it'll tell you what types and methods are available. I can't really help you with links here because you didn't mention which crates you are using.

I would advise reading at least the first couple chapters.

The book is actually a good tutorial, and Rust's type system is opinionated enough that stumbling through blindly will probably result in a lot of frustration where the compiler won't accept code that you think is correct.

If it helps, most Rust programmers use VS Code and the rust-analyzer plugin.

1 Like

I suggest reading the book and taking the time to read every chapter, even the boring ones that seem to not teach you much. Type all the example code.

1 Like

FYI, last I checked maybe 6 months ago, Rust and its LLVM backend lacked official support for the Xtensa architecture used in ESPs (though there was a proposed branch for it), so you might have to figure out how to build rustc and LLVM (I hope you have a powerful CPU and a lot of RAM to compile LLVM).

Also, interfacing with peripherals might be annoying if no one has published wrapper crates around the necessary ESP HAL libraries written in C.

All that is to say I'd start with the Raspberry Pi if I were you :sweat_smile:

1 Like

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.