Packages: Lang: add rust support

Created on 14 Feb 2020  路  9Comments  路  Source: openwrt/packages

Add rust-lang support

Most helpful comment

I've thought about adding Rust support for a while... My main concerns are:

  • musl is in their second tier of support, with most musl platforms only getting build tested with the standard library only. I don't know how stable that is, though I know almost nothing about Rust and maybe it is already very stable.

  • I don't have a lot of free time to do this :joy: Building the Go build system took a while, even though I basically copied Debian's system. Plus I'm already busy enough supporting Python and Go, not sure I can add another language.

On the other hand, since I'm the one that brought Go packages into the feed, I feel like I need to make Rust packages possible to bring balance to the Force :joy:

All 9 comments

Why?

I'll let myself to answer.

First of all, some packages such as Suricata require Rust to work properly.

https://github.com/openwrt/packages/pull/8659

Feature requests are rarely effective, maybe try the forum or IRC
To respond to @neheb, rust-lang for embedded make more sense than golang or python, better performance and size, when the architecture is supported :(

Sure. python is relatively huge.

I know go is large. No idea how big rust is.

I don't have much experience in rust
Just did some tests and a stripped hello world is ~200k with the rust stdlib
There is no stable ABI yet in rust, so it seems that you have static binaries with everything in it except libc which is inked
no idea how hard it is to have separate libs, as for OpenWRT the solution around unstable ABI can be just rebuild the firmware

Not sure how slow and painfull it would be to rebuild the rust compiler & cargo like we do for golang.

I've thought about adding Rust support for a while... My main concerns are:

  • musl is in their second tier of support, with most musl platforms only getting build tested with the standard library only. I don't know how stable that is, though I know almost nothing about Rust and maybe it is already very stable.

  • I don't have a lot of free time to do this :joy: Building the Go build system took a while, even though I basically copied Debian's system. Plus I'm already busy enough supporting Python and Go, not sure I can add another language.

On the other hand, since I'm the one that brought Go packages into the feed, I feel like I need to make Rust packages possible to bring balance to the Force :joy:

Not to mention that ~90%+ of all targets wont be able to run it anyway?

Was this page helpful?
0 / 5 - 0 ratings