Rust on ESP8266


#1

I just published this (pre-alpha, very hacky) script for building ESP8266 firmware written in Rust:


[poll] Release announcements: 'running' topic, or new topic per version?
#2

Over the last past few days, the script has been greatly improved. Generating bindings should work for all Arduino/ESP SDK libraries as well as dependencies listed in platformio.ini. Whitelisting is used for bindgen to avoid bloat and unnecessary failures. Documentation has been greatly expanded.


#3

Nice. I have a few of these laying around. Have tried Micro Python and Mongoose OS so far. Will try and find time to have a play with this.


#4

You glorious, glorious individual. I am. So excited. For this.

I’ve a batch of 10 ESP8285s and a Minix arriving soon, so will hopefully be first attempting this deployment over thanksgiving break (Nov 17 to Nov 28). This would entail starting from a fresh ubuntu install, so I’ll document the whole process in line with issue 6.

I’m new to Rust and to the 8285, though I’ve used my fair share of different microcontrollers- I’m in wearable robotics & biosensors sorts of stuff.


#5

I pushed some more updates to the repo which should make it more user-friendly and hopefully more reliable. See the README for update instructions and more details on the changes.

Has anyone built anything interesting for ESP8266 in Rust so far?


#6

I haven’t gotten the chance to use this script yet but I’ll try to do so soon.

The thing I’m mostly wondering about is what we’ll have to do for library support. Like…having more…Rust-y libraries to use in ESP development would be really cool


#7

I’ve pushed a few changes to use a more recent mrustc and Arduino SDK. Rust dependencies using cargo-vendor are now supported. I’m also working on an implementation of embedded-hal for ESP8266. I’ll push it to crates.io once I figure out the proper way to handle libraries that depend on bindings to the Arduino SDK.


#8

I’ve just pushed a major update resulting in much cleaner project directories. Even better, the esp8266-hal crate is now available! See the esp-rs repository for details.


#9

Yay! New update! And integration with the embedded-hal ecosystem :tada:

I just wanted to let you know that I really appreciate you doing this!
Even though I am currently busy with other projects, I have several ESP’s lying around that are in strong need of a rust-based firmware :slight_smile:

Thanks so much for blazing the trail! :heart:


#10

Hello,
I am right now testing what you did and it sound awesome. I actually never used RUST, but being table o use compiled language else than C and C++ would be very interesting. So maybe, I will start to program in RUST :smiley: So I have seen that you base your work on the Arduino SDK, but would it be much more difficult to use esp-open-rtos? Is it possible for a beginner like to implement such setup or would I spend month?

Thanks :wink:


#11

It’s not necessarily difficult but will likely require you to understand the build process pretty well. You can start with the advice I gave to someone wanting to use this for ESP32, but unless PlatformIO supports esp-open-rtos, you’ll have to rip out all of the parts of the script that use PlatformIO and replace them with the equivalent steps for the esp-open-rtos build process.


#12

Hi :slight_smile:
The build script was running for hours on my laptop, I had some fix to put as well but at the end it didn’t succeed :-/ I will have to look more closely again but for the moment I have no time. Anyhow I am really interested about your project so I will do my best to fix it :stuck_out_tongue: Did you consider to use Docker? Cause it would be much easier for the setup…

Ciao :slight_smile:


#13

Sorry to hear that it didn’t work… Docker support sounds interesting… if you manage to get something working, I’d love to get a pull request!