> On May 2, 2025, at 13:07, Alan Mackenzie <a...@muc.de> wrote: > > Hello, Eli. > > On Fri, May 02, 2025 at 13:47:02 -0400, Eli Schwartz wrote: > >> Compiling rust officially requires building the pre 1.0 version of rust, >> itself written in ocaml, and then building *every* version of rust since >> then, one by one, in turn, without skipping a single one. That is over >> 80 different versions of rust, you need to compile all of them in order >> to get to the current one. > > No thanks! There's only so much time left before the Sun becomes a red > giant. But this attitude must limit the portability of rust to different > processors, such as are found in embedded systems. >
For embedded systems, I assume you'd normally be cross-compiling. So all you'd need to get started is a current rust binary package for your build system (let's say x86-64-linux). With that, you can build a cross-compiler x86-64-linux->toaster-none, and build your toaster control software with it. You wouldn't normally want to be running the rust compiler on your toaster at all, but if it somehow has enough memory and storage for that, then you should be able to use your cross-compiler to build a native toaster->toaster rust compiler, and copy it to the toaster. And if you then have the patience to rebuild rust natively on the toaster, at this point you can. But by no means should you need to build 80 versions of rust on the toaster.