Live data from Hacker News

Rust on RTL8710 running FreeRTOS

polyfractal.com

41–47 of 47 posts

Re: Rust on RTL8710 running FreeRTOS

#41
post #12

Earlier quoted context omitted.

Is rust actually used in the embedded world, anywhere? All sorts of languages have been made to run on micro controllers, from Pascal to Scheme.

Not many languages can be made to run efficiently on a 83 MHz core with few kbytes of RAM. Pascal, maybe, but it's about the same thing as C. Scheme would be nice, but it's both more resource-hungry and the static checking is sort of bolted on. With Rust's security features I hope we'll have fewer crashing or crackable embedded devices.

Pascal, these guys have options for almost all relevant processors.

http://www.mikroe.com/mikropascal/

Scheme, do people actually know how powerful RTL8710 is in regards to the computers used to create Scheme?

RTL8710 has a ARM Cortex M3 @ 166 MHz with 48KB available to user and 1MB flash.

Scheme was developed on the ITS OS, running on PDP-10, which could have up to 256 kilowords (not KB), and ran at about 30 MHz.

I am with you on Rust.

The majority of these tiny devices have more resources than 70's mainframes, that used safer systems programming languages.

Re: Rust on RTL8710 running FreeRTOS

#42

Earlier quoted context omitted.

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…

We use embedded C++ though it is mostly C with classes and sugar after throwing out STL and exceptions. I'm eagerly awaiting more embedded friendly Nim improvements since it can be plumbed into existing embedded C tool chains.

Happy to see that you mentioned Nim. What improvements are you looking for in regards to embedded development?

Re: Rust on RTL8710 running FreeRTOS

#43

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. 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

Will do, thanks for the link! Didn't realize the Pine64 folks had a forum setup.

Fair warning, my hardware skills are shoddy at best, but I may be able to help with the Rust side :)

Re: Rust on RTL8710 running FreeRTOS

#44
post #39

Earlier quoted context omitted.

> The momentum behind the C ecosystem is so overwhelming that Rust simply will not get a foothold anytime soon. You could also say this for C on Unix in 1990. Or x86 assembly for PCs in 1985. In 1990, the idea that, 25 years later, we would be deploying network services written in JavaScript was unthinkable. Change takes time, and C won't die, ever—but history shows that change eventually does happen.

> You could also say this for C on Unix in 1990. You can still say this on 2017. No UNIX kernel will ever be written in anything other than C, the way they are married to each other and the way UNIX culture works. To get rid of C we need to get rid of UNIX, even a POSIX like OS coded in say Ada, needs to expose C like semantics for POSIX compatibility. Which means we still have a long way ahead in what concerns impro…

Yeah, I was referring to the userland, not the kernel.

Re: Rust on RTL8710 running FreeRTOS

#45
post #14

Earlier quoted context omitted.

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…

What about ARM's mbed bet(and ARM know their stuff) , written in c++ ? no chance for it sucseeding in the IOT , yet ARM claim a large ecosystem ?

mbed is not a large ecosystem, its large in the 'IoT' world, but no one doing real embedded work (more than say half a million units) would use mbed.

Re: Rust on RTL8710 running FreeRTOS

#46
post #14

Earlier quoted context omitted.

What about ARM's mbed bet(and ARM know their stuff) , written in c++ ? no chance for it sucseeding in the IOT , yet ARM claim a large ecosystem ?

mbed is not a large ecosystem, its large in the 'IoT' world, but no one doing real embedded work (more than say half a million units) would use mbed.

>> real embedded work (more than say half a million units)

Altough most of the units shipped will be above this, won't a decent share of projects(in general ,not just the IOT) be below that threshold ?

Re: Rust on RTL8710 running FreeRTOS

#47
post #42

Earlier quoted context omitted.

We use embedded C++ though it is mostly C with classes and sugar after throwing out STL and exceptions. I'm eagerly awaiting more embedded friendly Nim improvements since it can be plumbed into existing embedded C tool chains.

Happy to see that you mentioned Nim. What improvements are you looking for in regards to embedded development?

The ability to do useful things without the GC would be nice.
Post reply on HN