Compiling a medium-complexity crate can consume a couple of gigabytes of RAM to compile, so it's very unlikely (bordering on impossible) that 256MB RAM is enough to compile stdlib.
You're probably better off cross-compiling, or using one of the existing ARM targets for rust.
That the install fails is weird I'll admit, and my guess is that that's due to ARM not being a tier 1 platform (yet?).
But even if it had succeeded, what I said previously still holds, and that's probably how it got broken in the first place: not many people at present compile on ARM hardware. Many more cross-compile their applications for ARM.
Might have something to do with ARMs history with designing hardware that is power-efficient but anemic compared to desktop-class chips (something that is no longer necessary true) but the legacy of that remains.
Am I missing something? It looks to me like it’s running out of memory while merely downloading and unpacking precompiled packages. That 256MB of ram is not enough to do this seems a lot more surprising than if they were trying to build stdlib from source. (Is some component of rustup buffering a full download before writing it out??
I believe this section from the .tar.gz unpacking code unpacks each file into an in-memory buffer before writing it to disk. The abort happened when trying to allocate 120 MB, which might be the size of a single file in a Rust toolchain (though on my system, the largest toolchain files are about 60 MB).
This could probably be changed to unpack and write the file in smaller chunks, though other commenters might be right that compiling non-trivial Rust crates might be impossible on a system with this little free memory.
Are you sure this is a ram issue? The error looks a lot like what I see using apt to install large packages on an image based rootfs linux distro. At a point there is just no more room on the partition. I can often work around the trouble by creating a tmpfs or symlinkng to a larger partition.
I am stabbing in the dark a bit, but thought I'd clarify this point. If I'm wrong you may ignore me