Plan to support RUST language toolchain?

Does LEDE plan to support RUST language ?

There are no specific plans regarding Rust support at the moment, but there aren't plans to not support it either :slight_smile:

I am not sure about the specific requirements for Rust but I do know that we're unable to support Go atm as it is incompatible with musl libc.

Since the Rust compiler is written in Rust, it must be built by a precompiled "snapshot" version of itself (made in an earlier state of development).

and do not support cross-compilation.

For cross compilation, maybe this is helpful.

rust platform support list

If rust has a chance using LLVM.
What about zig (toolchain and language)?
Wouldn't it be complementary with the crate cargo-zigbuild (use zig toolchain as cc/ld)?

Platform support list
or see:

# all targets with libc supported
zig targets | jq .libc

Sadly zig has no official rustup-like manager, though there is zigup (unofficial) inspired by rustup. Just download the host target toolchain.
I have even tested this tool on docker. - docker-buildx image

If you want it, you will have to make it happen - or (in all likeliness) no one (else) will.

In the process you will uncover the potential issues, some of which might make it unsuitable (as in unsufficient target coverage for mips/ ARM, static linking (don't, really, don't) or binary size (OpenWrt is still mostly targeted at devices which won't give you more than 8-16 MB flash in total (even on devices that come with 128 or 256 MB NAND flash, the actually usable free flash is often in the 20-50 MB range, minus the size of base OpenWrt kernel- and userland), so if your resulting hello_world binary is in the >>1 MB range --> return to sender).
…or you might even succeed and make it happen, probably even manage to motivate additional helpers and developers in the process, but someone will have to get the ball rolling.

Support for the latest fad of programming languages of the day isn't a self-servicing task in itself, either you need it to compile the actually useful tools you care about or you don't, in which case probably no one will miss it. Not all languages are suitable for this task, while that doesn't prevent their addition to the packages feed for very optional (leaf-) packages that only work reasonably on high-end platforms (things like suricata come to mind), you have to evaluate their usefulness on a typical OpenWrt system - and with that in mind, how much efforts you want to spend.


Yes, of course! Language contest many times is irrelevant.
I was just trying to make the LLVM connection! Hopefully, I haven't been misunderstood...

In relation to a toolchain supporting mips as target, it doesn't mean that it would run on the same platform, just as it already does with arm64 and riscv64 up to now.

I have already succeeded in running initial tests on some inexpensive platforms.
zig executable on TP-Link TL-WR840N v4 (OpenWrt):