This package will install rust's libstd
as a dynamic *.so
library in the
/usr/lib
folder of your OpenWRT device. This allows for very small rust
binaries to be compiled which is required for OpenWRT use.
For this example to work you need to have the lang/rust
package
from Grommish. This package will build the rustc
compiler
and the cargo
application from source tuned for use with dynamically linked
musl
and softfloat MIPS and MIPS64 targets.
To compile this minimal working example the following steps must be taken:
- Install and build the requirements.
- Clone this repository in the
package/lang
directory of the OpenWRT toolchain. - Execute
make menuconfig
in the toolchain root and select therust-libstd
library in theLanguages
menu either with a*
orM
selector. - Build the package by executing
make V=s package/rust-libstd/{clean,compile}
in the root of the toolchain.
When everything goes succesfull you now have an installable ipk
in the
bin/packages/
directory.