Thanks for showing the errors! Setting up a toolchain is exactly this and it can be painful. I learned from you debugging it out loud. Hope to get Rust running with ESP32 as well.
fwiw, rust-build is now deprecated and its replacement is "espup", which was a pretty straight-forward procedure for me to get a working rust-on-esp toochain
Super helpful, thanks! I noticed that my demo does `Building [=======================> ] 196/202: esp-idf-sys(build) / Finished release [optimized] target(s) in 52.62s` - this is a VM with 24 vcores (Threadripper 1950X) and 64GB RAM. It is no slouch, but this feels slower than I'd expect it to be.
I think the first build pass is always very slow, however subsequent builds should not need to rebuild sub-crates and hopefully they are faster - for me they generally are. I believe in this instance a threadripper may also optimise for parallelism rather than pure GHz and I am not sure rust can take fully advantage of that. I also wish rust compiles would be faster. Until that happens, `cargo check` and debug builds seem to be the way to iteratively develop.
Hey, Thanks for the effort. I appreciate your content. I have a small question, What distro&theme do you use? and also i am really interested in the disappearing terminal
Hi, I use Manjaro linux. For a desktop environment I use bspwm and the disappearing terminal is a tabbed + alacritty. The script for triggering this is messy (to switch to the right window and show/hide) and looks like: ``` #!/usr/bin/env bash set -x window_id=$(xdo id -N tabbed) if [ -n "$window_id" ]; then bspc query -m pointed --nodes "$window_id"'.focused.!hidden' | grep "$window_id" if [ $? -eq 0 ]; then # non-hidden window in the current monitor/desktop. can hide bspc node "$window_id" -g hidden else # if really hidden, unhide. bspc query -m pointed --nodes "$window_id"'.hidden' | grep "$window_id" if [ $? -eq 0 ]; then bspc node "$window_id" -g hidden -m pointed fi bspc node "$window_id" -d focused bspc node "$window_id" -m pointed bspc node "$window_id" -f fi else setsid tabbed -n tabbed -c -g '3240x1500+300+48' -t darkblue -U red alacritty --embed fi ```
ESP32 has a lot of flash compared to most other embedded systems. That being said, I believe most of the size of the binary comes from debug symbols and those do not end up on the device. I would expect the binary to become much smaller after a strip or an objcopy to bin format.
Thanks for showing the errors! Setting up a toolchain is exactly this and it can be painful. I learned from you debugging it out loud. Hope to get Rust running with ESP32 as well.
Thank you very much. This was great tutorial ! More please
Nice walk through of setting up and blinky.
Cool that you did it in a VM to show what errors one might encounter. Helped a lot :)!
Wonderful information. A small thing. The Wroom Devkit has internal LED on pin18, not pin2 as many other kits have.
fwiw, rust-build is now deprecated and its replacement is "espup", which was a pretty straight-forward procedure for me to get a working rust-on-esp toochain
This video is super helpful, thank you!
Super helpful, thanks! I noticed that my demo does `Building [=======================> ] 196/202: esp-idf-sys(build) / Finished release [optimized] target(s) in 52.62s` - this is a VM with 24 vcores (Threadripper 1950X) and 64GB RAM. It is no slouch, but this feels slower than I'd expect it to be.
I think the first build pass is always very slow, however subsequent builds should not need to rebuild sub-crates and hopefully they are faster - for me they generally are.
I believe in this instance a threadripper may also optimise for parallelism rather than pure GHz and I am not sure rust can take fully advantage of that. I also wish rust compiles would be faster. Until that happens, `cargo check` and debug builds seem to be the way to iteratively develop.
Great video! I learned soo much.
Hey, Thanks for the effort. I appreciate your content. I have a small question,
What distro&theme do you use? and also i am really interested in the disappearing terminal
Hi,
I use Manjaro linux. For a desktop environment I use bspwm and the disappearing terminal is a tabbed + alacritty. The script for triggering this is messy (to switch to the right window and show/hide) and looks like:
```
#!/usr/bin/env bash
set -x
window_id=$(xdo id -N tabbed)
if [ -n "$window_id" ]; then
bspc query -m pointed --nodes "$window_id"'.focused.!hidden' | grep "$window_id"
if [ $? -eq 0 ]; then
# non-hidden window in the current monitor/desktop. can hide
bspc node "$window_id" -g hidden
else
# if really hidden, unhide.
bspc query -m pointed --nodes "$window_id"'.hidden' | grep "$window_id"
if [ $? -eq 0 ]; then
bspc node "$window_id" -g hidden -m pointed
fi
bspc node "$window_id" -d focused
bspc node "$window_id" -m pointed
bspc node "$window_id" -f
fi
else
setsid tabbed -n tabbed -c -g '3240x1500+300+48' -t darkblue -U red alacritty --embed
fi
```
@@embedded-rust Cool mate! Thanks for your response
Woww, it really is complicated
Out of curiosity, does ESP32 have enough flash to store a rust binary that does anything useful? 3.6M seems to be excessive for a simple blinky demo
ESP32 has a lot of flash compared to most other embedded systems. That being said, I believe most of the size of the binary comes from debug symbols and those do not end up on the device. I would expect the binary to become much smaller after a strip or an objcopy to bin format.
Awesome
Thanks dude... It looks complicated for just blinky app.. 😢😢
You can say that again