Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    J

    Jorge Aparicio

    blog.japaric.io · Personal blog · on HN since 2017

    Jorge Aparicio writes about embedded programming in Rust, covering ARM Cortex-M microcontrollers, concurrency, real-time frameworks and stack analysis.

    Visit blogHN submissions
    Languages & CompilersHardware & ElectronicsSystems & Performance
    What HN says

    HN commenters point to it as the place to learn Rust on bare-metal targets, including the quickstart guide and his cross-compilation tooling.

    Stats for nerds
    23HN people shared it
    11linked in comments
    865story points
    Feb 2024last shared
    2017people per year2024

    Top posts on HN

    1. 1
      Embedded in Rust: Brave new I/O
      6 people · 371 points · first shared 2018 · 65 comments on HN
    2. 2
      Rust your ARM microcontroller
      4 people · 253 points · first shared 2017 · 16 comments on HN
    3. 3
      Fearless concurrency in your microcontroller
      4 people · 153 points · first shared 2017 · 51 comments on HN
    4. 4
      Microamp: Asymmetric Multi-Processing on Microcontrollers
      1 person · 76 points · first shared 2019 · 3 comments on HN
    5. 5
      Implementing a static stack usage analysis tool
      1 person · 4 points · first shared 2019 · 1 comments on HN
    6. 6
      RTFM v0.3.0: safe `&'static mut T` and less locks
      1 person · 3 points · first shared 2018 · Discussion on HN
    7. 7
      Real Time For The Masses goes multi-core
      1 person · 3 points · first shared 2019 · Discussion on HN
    8. 8
      RTFM v2: real-time for the masses on a Cortex-M with Rust
      4 people · 2 points · first shared 2017 · Discussion on HN
    9. 9
      Homepage
      2 people · first shared 2017
    10. 10
      Safe dma
      1 person · first shared 2020

    What HN people wrote when they linked it

    • scouttApr 2019

      Write from scratch, maybe. Rewrite, I don't think it will happen anytime soon. In fact, the more time it passes, the more code needs to be rewritten.

      Regarding firmware, if the talk was about bare-metal embedded development, then I think Rust is the solution to a problem that no one has.

      Since the food on my table comes from firmware development, I passed several days trying to understand the reasons to move to the approach described here: http://blog.japaric.io/brave-new-io/ (Embedded in Rust blog, great reading BTW).

      But found little. It's a nice toy but it may be too much.
      If that is the trend, then I think Rust for Embedded is the answer to a question no one asked, because in my work, if I need to set a bit into a register, I have to be sure it's fking set; not playing around "just because it may be problematic".

    • awelkieSep 2017

      I believe rust's safety guarantees are enough to ensure the soundness of passing data to/from interrupt contexts and interrupt handler re-entrancy. See rtfm[0] for an example and a good explanation. I think DMA handling can be made safe by using the right abstractions, and then you'd just need to trust that any piece of code that accesses the memory uses the abstraction instead of accessing it directly.

      Checking interrupt priorities sounds like an interesting problem. What is the state of the art in deadlock prevention? It would also be cool if you could tell the compiler "I need this interrupt handler to return in less than n clock cycles." I wonder if someone could write a rust compiler plugin to check that.

      [0]: http://blog.japaric.io/fearless-concurrency/

    • steveklabnikOct 2017

      So, some quick things: every Rust compiler is a cross-compiler, so that's not the tough part. You need to compile 'libcore' for the target, but https://github.com/japaric/xargo makes that pretty straightforward if your chip isn't one of the ones provided by the Rust project, if it is, then you just need to run a command to download it and you're good to go.

      https://forge.rust-lang.org/platform-support.html is said target list today. AVR is coming soon, it works but has bugs and is hacky.

      Japaric is quite prolific, he writes over at http://blog.japaric.io/ and his latest posts are about his RTOS-like framework.

      Finally if you're into ARM, https://www.tockos.org/ might be up your alley.

    • jamesmunnsFeb 2024

      You can't generally change the direction the stack moves, at least on targets like Cortex-M. Maybe in ASM it'd be feasible to work around, but getting LLVM to do this isn't anything I've ever seen.

      The "walk off the edge" technique is what is described here [0], in embedded rust we have a tool that does this automatically (from the author of the post) called `flip-link` [1]. It requires a second linker/re-linking pass to do this sizing automatically (you could also do the same manually with a linker script in one pass, if you hardcode certain sizes).

      [0]: https://blog.japaric.io/stack-overflow-protection/

      [1]: https://github.com/knurling-rs/flip-link

    • pjc50Dec 2018

      There are various alternatives, but generally the approach is to know what address you need in advance and create an object for it at compile time that can be accessed type-safely.

      e.g. https://zinc.rs/apidocs/ioreg/index.html

      or the longer but more detailed http://blog.japaric.io/brave-new-io/ , which covers various approaches. It even points out that you can use the type system to enforce that peripherals are only accessed from multiple threads or parts of the program in a safe manner, which you can't do if you can just reinterpret-cast into anything.

    • anderspitmanNov 2017

      I'm so excited that we're feasibly within a year or two of being able to develop embedded devices in Rust[0] on RISC-V microcontrollers [1] running on open source RTOSes also written in Rust[2]. It's currently already possible but still requires quite a bit of hacking. Plus the RF stacks (Bluetooth in particular) aren't there yet. What a time to be a developer. PS RISC-V on my X220 wouldn't hurt either.

      [0] http://blog.japaric.io/quickstart/

      [1] https://www.sifive.com/products/hifive1/

      [2] https://www.tockos.org/

    Related

    Ferrous Systems Blogferrous-systems.com101 people

    A lock-free ring-buffer with contiguous reservations (2019)

    Ferrous Systems Blog
    Company · last shared 2026
    Interrupt (Memfault)interrupt.memfault.com51 people

    From zero to main(): How to write a bootloader from scratch

    Interrupt (Memfault)
    Company · last shared 2026
    Federico Mena-Quinteropeople.gnome.org/~federico46 people

    Rust things I miss in C

    Federico Mena-Quintero
    Personal · last shared 2021
    Not a Monad Tutorialnotamonadtutorial.com40 people

    Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

    Not a Monad Tutorial
    Publication · last shared 2023
    Niko Matsakissmallcultfollowing.com221 people

    Towards a Rust Foundation

    Niko Matsakis
    Personal · last shared 2026
    Andrew Gallantblog.burntsushi.net141 people

    My FOSS Story

    Andrew Gallant
    Personal · last shared 2026
    Manish Goregaokarmanishearth.github.io97 people

    Picking Apart the Crashing iOS String

    Manish Goregaokar
    Personal · last shared 2026
    Bluish Coderbluishcoder.co.nz77 people

    Using Freenet

    Bluish Coder
    Personal · last shared 2025