Elektrine lite

← Feed

@thejpster@hachyderm.io

Post #1957359

2026-05-03 18:52 UTC

This paper finds that Rust on an microcontroller costs you about 10% extra flash space, actually saves you a bunch of RAM, and takes no extra time to deliver (as compared to C). Seems about right - especially as the C version needed a heap and the Rust version did not. https://arxiv.org/abs/2604.25679 Edit: replaced URL of PDF with URL of abstract

Replies (4)

  • @arabine@piaille.fr 2026-05-03 20:12

    @thejpster I stopped when they have indicated that the C version used heap because of a JSON library.

    Open ##1957617

  • @thejpster Following any safety standard, and good sense elsewhere in embedded, nobody uses heap allocation in C.

    Open ##1957618

  • @hyc@mastodon.social 2026-05-03 20:44

    @thejpster pro tip: always link to the abstract, not the pdf, so that you get useful previews of the paper. https://arxiv.org/abs/2604.25679 Anyone interested can always get the pdf from the abstract page.

    Open ##1957622

  • @jenesuispersonne@piaille.fr 2026-05-06 20:44

    @thejpster@hachyderm.io Well I just get a graph from the PDF. And your affirmation looks.. weak. Rust take 10% more disk space: ok. Rust take 10% more RAM because not using heap may by more correct. Also, in paper they express the work done on optimizing rust binaries (that can be seen in the graph too). I'm quite sure if they did the same amount of work on C binaries to reduce heap usage, there will be no difference in RAM usage and much less heap peak consumption, putting the 2 solutions in the same ballpark.

    Open ##2313516