4 ms·
I have a bunch of various ESP32‘s lying around and I’ve been getting by with copy pasted arduino code. Works fine for most things but I’ve also told myself man
by aloer 3y ago
I have a bunch of various ESP32‘s lying around and I’ve been getting by with copy pasted arduino code.
Works fine for most things but I’ve also told myself many times now that I would like to dive deeper when I find the time.
My background is in web and Java. Never done C or C++.
Is rust on esp already good enough for a beginner?
- bluejekyll 3y agoRust makes use of some more advanced type features than Java has. You’ll want to focus on some of the differences between traits and interfaces. Additionally, in Java you’re probably used to a lot of runtime dynamism, this is possible in Rust, but not something you usually need to use. To understand this better, look at dyn object safety. The biggest thing in Rust that you need to become familiar with from Java is the ownership system. First, Java is a default copy-by-reference language, whereas Rust is move by default. So learn the difference between, T, &T, and &mut T. Learning the ownership system will make you disappointed in Java’s thread-safety story. Rust makes thread safety and multiple references to values very obvious and you need to be explicit about how things should be shared. This will probably be your biggest hurtle, based on my experience. Read the book, these concepts are all explained very nicely: https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/
- kelvie 3y agoDon't know the answer to your question, but depending on what you want out of it, I find esphome with inlined C++ more than enough for most cases (for anyone that knows how to code in general). It's mostly declarative, like writing a kubernetes helm chart with some templating, which should be somewhat at home for web folks.
- askvictor 3y agoYou can run python (micropython), javascript (espruino) or lua on ESP32. If you're just tinkering/playing around, those are great options.