It's going to be really great as Rust spreads further and further into the embedded world. I know enough C to get by, but I'm always second guessing myself when things start to get complicated, and Rust has really made lowish-level programming a lot easier for me. The safety features in addition to exposing a C ABI make it a great language for build once, run everywhere (everywhere that LLVM supports, anyway). Exciting times.
Unfortunately, there's little chance for Rust to make inroads into the embedded market, tho I wish it were otherwise.
C++ has had many benefits over C for embedded s/w for many years and has similarly failed. Note that contrary to popular belief, C++ does not result in larger, more inefficient s/w than C (for the correct C++ subset).
The momentum behind the C ecosystem is so overwhelming that Rust simply will not get a foothold anytime soon.
Tl;dr: this works because the RTL8710 is an ARM core, which is supported by LLVM and thus Rust anyway.
Its a nice how-to for working with the chip though.
Just because something uses ARM doesn't mean it'll be easy to target, there's a hell of a lot more to getting something running on an embedded system than just what basic architecture it supports.
Delighted to see this tidy summary! I've been wading through four or five documentation sources over the past few days getting everything hooked up. I'm working on a project that uses SPI and would love to use Rust... I may pick your brains further.
Most people use these little things for sensor/data loggers (weather stations, power monitoring, indoor temperature, etc) or little widgets that need connectivity and can be tethered to a power outlet (small display showing the weather outside, etc)
The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could definitely run it off a battery if you aren't waking it up too often.
The real problem with the RTL8710 (and ESP8266, and any other chip that uses WiFi) is that WiFi is very energy intensive. It takes a lot of juice to blast out a 2.4Ghz signal.
I don't know what the numbers are for the RTL8710, but the ESP8266 uses 50-170mA when receiving/transmitting data, which will drain a battery very quickly. (Source: http://bbs.espressif.com/viewtopic.php?t=133)
[+] [-] orthecreedence|9 years ago|reply
[+] [-] TickleSteve|9 years ago|reply
C++ has had many benefits over C for embedded s/w for many years and has similarly failed. Note that contrary to popular belief, C++ does not result in larger, more inefficient s/w than C (for the correct C++ subset).
The momentum behind the C ecosystem is so overwhelming that Rust simply will not get a foothold anytime soon.
[+] [-] lacampbell|9 years ago|reply
[+] [-] MrBuddyCasino|9 years ago|reply
[+] [-] axman6|9 years ago|reply
[+] [-] joezydeco|9 years ago|reply
[+] [-] polyfractal|9 years ago|reply
I cringed when I saw this at the top of HN because I knew the shame that is my soldering skill would be seen by a few hundred people :)
[+] [-] tomcam|9 years ago|reply
[+] [-] richchurcher|9 years ago|reply
Strongly recommend you post a link to this at the PADI Stamp forums, I'm sure others will appreciate it. http://forum.pine64.org/forumdisplay.php?fid=57
[+] [-] polyfractal|9 years ago|reply
Fair warning, my hardware skills are shoddy at best, but I may be able to help with the Rust side :)
[+] [-] robohamburger|9 years ago|reply
[+] [-] Manishearth|9 years ago|reply
Most of the rest of libstd requires a known OS abstraction to exist.
Most of the algorithmy stuff (e.g. regex) has been moved out of the stdlib so you can pull it in separately if the crate supports no_std.
Not perfect, and a lot more crates could support no_std, but it's sometimes good enough.
[+] [-] alkonaut|9 years ago|reply
[+] [-] polyfractal|9 years ago|reply
The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could definitely run it off a battery if you aren't waking it up too often.
The real problem with the RTL8710 (and ESP8266, and any other chip that uses WiFi) is that WiFi is very energy intensive. It takes a lot of juice to blast out a 2.4Ghz signal.
I don't know what the numbers are for the RTL8710, but the ESP8266 uses 50-170mA when receiving/transmitting data, which will drain a battery very quickly. (Source: http://bbs.espressif.com/viewtopic.php?t=133)
[+] [-] voltagex_|9 years ago|reply
[+] [-] diimdeep|9 years ago|reply