Hacker News new | ask | show | jobs
by exDM69 4683 days ago
The ability to run with a small runtime system on bare metal, microcontrollers and such makes Rust, in my opinion, one of the most interesting new languages out there right now.

Native code with a lean and mean runtime system has a lot of advantages over bytecode based virtual machines and slow interpreters.

2 comments

This is an amazing feat with Rust being a modern open alternative to C! So far many have tried and failed. Rust developers have learned well and Rust seems to be on right track.
I've been working on this problem a while ago, but Virgil II didn't get much traction outside of a couple academic projects. It's here though:

http://compilers.cs.ucla.edu/virgil/

Javascript is in a similar situation with node.js ported to a Cortex-M3 ARM microcontroller (similar to the Due) http://technical.io/

I've been working off and on porting the go runtime to a microcontroller, but still finicking with segmented stack support.

> Javascript is in a similar situation with node.js ported to a Cortex-M3 ARM microcontroller

Well, yes and no. Yes, there are JavaScript environments ported to different platforms, including microcontrollers. But no, JavaScript is not compiled to native code ahead of time nor does it run without a big runtime system.

While there is some technical trickery involved in getting JavaScript running on different platforms, I find the new LLVM-based languages that run on bare metal much more interesting.

Due to its nature, even the best of JavaScript implementations waste quite a lot of resources compared to native code. While computers are fast enough and have enough memory not to notice the difference, it's still consuming more battery power and producing more heat than executing native code. And it's power and thermals that have been the limiting factor of computational power for the past decade.