-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more OpenWRT devices #4
Comments
We have not made any particular progress on this issue in 2 or so years, so I would like to propose that we close this issue. Marking this for a cleanup sweep. If we would like this to stay open, please provide an update to what this issue should be focused on. |
@jamesmunns To clarify, I made a passing comment on IRC. I'm interested in this topic to the extent that it's another target to play w/, and there does still seem to be binary size issues (some OpenWRT distros fit on a 4MB flash!) if you're using anything beyond But I don't have any OpenWRT hardware and I don't have the bandwidth to contribute; I simply appreciate someone trying to use Rust w/ MIPS :). |
uclibc is pretty dead. I'd not recommend adding any targets with it. openwrt will use musl where possible and it's definitely the superior libc. arm-unknown-linux-musleabi is broken and will stay broken. rustup comes with a libc, including a crt, but they're shipping the wrong crt for the link mode so it just crashes. the workaround is to have a linker wrapper that strips the incorrect linker flags and lets it use its own defaults. mips(el)-unknown-linux-musl works fine with the usual caveats that most of libstd is never tested on mips/el so for example backtrace doesn't compile because they use GNU specific extensions in a unix ifdef, so you need to avoid any library that uses backtrace, including failure (which would be easy to fix, but meh rust-lang-deprecated/failure#246 ) openwrt on x86 will work fine with the default compiler. i don't see any need to do anything here. (re @cr1901): we're have nearly thirty thousand devices out there with most of its userspace in rust. we replaced tokio with a reasonably sized alternative (i just happened to blog about that http://aep.github.io/rust-async-without-the-noise/), but libstd is an open problem. I'm hoping the embedded group will come up with something some day, since we have the same issue on bare metal :) |
I am closing this issue, please feel free to open another issue if you would like this discussed further. |
Currently, the Rust compiler supports MIPS OpenWRT devices via these targets:
mips(el)-unknown-linux-uclibc
. OpenWRT 15.05. There is no binary release ofstd
for thistarget though. Having binary releases for this target is at least blocked by add support for mips-uclibc targets rust-lang/libc#361
mips(el)-unknown-linux-musl
. OpenWRT Trunk. As a Tier 3 (?) target.OpenWRT not only supports MIPS devices but also ARM devices and other architectures. We should
investigate what's required to support those other targets.
For OpenWRT 15.05 ARM devices, we'll probably need an
arm-unknown-linux-uclibc
target.OpenWRT Trunk for ARM seems more tricky. In theory, the
arm-unknown-linux-musleabi
target is theright target but that produces statically linked binaries but users of these devices will probably
want dynamically linked binaries to keep binary sizes small. Hence something like
rust-lang/rfcs#1721 to support these devices.
The text was updated successfully, but these errors were encountered: