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.
The second dependency is the lang/rust-libstd package
which takes the precompiled rust libstd dynamic library (*.so) and packs it
in an installable ipk package.
To compile this minimal working example the following steps must be taken:
- Install and build the requirements.
- Clone this repository in the
package/langdirectory of the OpenWRT toolchain. - Execute
make menuconfigin the toolchain root and select therust-hello-worldapplication in theLanguagesmenu either with a*orMselector. - Build the package by executing
make V=s package/rust-hello-world/{clean,compile}in the root of the toolchain.
When everything goes succesfull you now have an installable ipk in the
bin/packages/ directory.