Pandora The RUST language on OpenPandora


petevine

Still Fresh
Joined
Sep 11, 2015
Messages
68
Hi,

I've seen a few pandora users requesting a Rust toolset for their platform so after investigating a little, here's what should be enough to pull it off:

A native build recipe using qemu-user:
https://github.com/warricksothr/RustBuild/issues/8#issuecomment-167079367

Discussion about soft-float quirks including useful info on building a cross-compiler:
https://github.com/rust-lang/rust/issues/30710

The way to go is to modify the built-in `arm-unknown-linux-gnueabi` target (together with `arm-unknown-linux-gnueabi.mk` file) which will preclude any problems later on during cargo builds.

Good luck! ;)
 
I tried to build rust on cross-compile.

Result, after days (and I mean it) of struggling, I got a partly functionnal Rust compiler.
Than I tried cargo, but this one failed, and because cargo needs cargo, and it's very difficult to alter make process when using cargo, I didn't succeed to have a cross compiled version of it. So yeah, good luck to all!

Thanks for tips @petevine , I know some are indeed interested in this language.
 
Do you have a working native rustc? If so, there's a `--local-cargo=` switch during the cargo bootstrap process which might work with qemu. However qemu-user is not good at handling multi-threaded applications so it's entirely possible cross-compiling is the only option at the moment.

On the other hand, I started my experiments with Rust in May, trying to run it on an unsupported x86 CPU and was using qemu-user in the beginning. Rustc was problematic but cargo seemed to work IIRC, which means cargo, like rustc, is mostly single-threaded.

EDIT:
Well, running under qemu-arm, it does manage to checkout all crates and then build itself, but some of the commands have to be reissued manually when it stalls (to see what command is being run use `VERBOSE=1 make`) so the emulation story on arm is good enough once you have a working native rust compiler. Cargo doesn't use much CPU most of the time so there's little slowdown.
 
Last edited:
Back
Top