Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nim's maintainer agrees with you I believe, and the API is as you suggest (volatileLoad and volatileStore): https://nim-lang.org/docs/volatile.html

However, under the hood, Nim compiles to C. So these are macros that typecast to volatile, does the read (or write), then casts back to non-volatile.

(Small plug for my nim project that is somewhat related to OP: https://github.com/EmbeddedNim/svd2nim)



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: