TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Raspberry Pi Bare Metal Programming with Rust

340 pointsby thiagopntsover 9 years ago

10 comments

jcofflandover 9 years ago
As a long time C programmer this is not very convincing. A C program to do the same requires far less voodoo. All you need to do is take the address of the GPIO register then toggle the bit. No name mangling. No error handlers to override. Don't get me wrong I know rust does have some compelling features. It does seem odd to me that so many of what would be compiler options in C are hard coded.
评论 #10918089 未加载
评论 #10918094 未加载
评论 #10917241 未加载
评论 #10918333 未加载
评论 #10917020 未加载
评论 #10917375 未加载
notabotover 9 years ago
As a C programmer who fiddles with low level stuff I wonder why people get exciting about such trivial thing.<p>Don&#x27;t get me wrong. Rust is an interesting language. The thing described in this post is well within its capability, i.e. IMO there isn&#x27;t really anything that worths bragging about. Such trivial thing neither demonstrates the real potential of Rust, nor answers important questions from real world engineering perspective.<p>I&#x27;m all for having better tool to write low level stuff. I have dabbled with Rust and the experience was eye-opening. I think Rust still have a lot to catch up though.
评论 #10917691 未加载
评论 #10918521 未加载
Aeolosover 9 years ago
I have the perfect project for this! Generate a signal using the GPIO ports to drive a mirror and camera in a synchronized fashion.<p>Does anyone know if the RPi GPIOs can be driven at around 80KHz? I&#x27;ve seen reports that this is possible, but that the USB or video driver tends to lock the CPU for long times, messing with timings - but hopefully running on bare metal would take care of that.
评论 #10917132 未加载
评论 #10916920 未加载
评论 #10918366 未加载
评论 #10916385 未加载
评论 #10916883 未加载
akerroover 9 years ago
Is Rust the future? As a C++ (hobby), Java (full time) developer, should I invest my time in Rust?
评论 #10916427 未加载
评论 #10916409 未加载
评论 #10917073 未加载
评论 #10916437 未加载
评论 #10916800 未加载
评论 #10917463 未加载
评论 #10916405 未加载
akhilcacharyaover 9 years ago
Outside of C, are there any other languages or platforms that can do this? I&#x27;d like something modern, but I haven&#x27;t liked what I&#x27;ve seen with Rust personally.
评论 #10917414 未加载
nickysielickiover 9 years ago
I remember reading a couple months ago that bare metal using Rust was in a bad state. If I recall correctly the outputs were prohibitively large, among other issues.<p>Has that changed?
评论 #10916251 未加载
kodover 9 years ago
If you want to play around with the code in this post that requires nightly, multirust makes it much more pleasant to use nightly and &#x2F; or stable rust.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;brson&#x2F;multirust" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;brson&#x2F;multirust</a>
s986sover 9 years ago
Very cool! Rust has been impressing me alot these past few months.
评论 #10916212 未加载
Animatsover 9 years ago
Very nice. A few more months and that should be stable.
kalimatasover 9 years ago
Thanks for sharing!