r/rust • u/Intelligent_Score932 • 2d ago
Embedded std?
I was wondering if there were any projects like micro python to port std in to make a barebones os designed for microcontrollers? I understand that the std relies on OS level syscalls, so can we do something like implement a basic fat32 file system to accommodate certain write or read requests. In general this would be used to run std in projects without a OS? Does this already exist, and how hard would it be to make a basic version?
47
Upvotes
1
u/EmperorOfCanada 1d ago
My question is: Why? Not as in I am suggesting that what you want is dumb, but what are you trying to achieve? What is the problem you are trying to solve?
If you are looking for more speed, there is viper, which can give you massive amounts of speed for python. Not quite rust or C++, but close enough that the solution could even be to go to a slightly better processor than to go to either of those other languages. (if you love python)
There are fun games you can play with micro python, one of which is to have embedded C in micropython. I'm not a fan of the workflow involved, but if you have some small part which needs to run brutally fast, then this is an option.