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

The current situation is "it works, but is not as easy as we'd like." We have plans underway to make it very trivial, but the needed infrastructure work isn't quite there yet.

A summary is "every Rust compiler is a cross-compiler, but you need a copy of the standard library for your target platform available." Getting said copy is what takes the work. In the future, we want it to be as easy as a call to the command-line, but for now, https://github.com/japaric/rust-cross is a good resource.

See also https://github.com/japaric/rust-everywhere , which is very interesting.



I'm maintaining a docker image to cross-compile at https://hub.docker.com/r/fabricedesre/rustpi2/. It's Rasberry Pi2 specific since it relies on a tweaked sysroot to link against OpenSSL and a few other libraries.

The way I'm using it is: docker run --name rustpi2 -v `pwd`:/home/rustpi2/dev/source -v $HOME/.cargo:/home/rustpi2/.cargo fabricedesre/rustpi2 cargopi build (cargopi is just equivalent to cargo --target=armv7-unknown-linux-gnueabihf)




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

Search: