Recent versions of cargo support always showing the progress indicator.
By default the progress indicator is hidden if the output is not a tty.
For bitbake builds, the output is redirected to a file and not a tty.
However, if we tell cargo to always show the progress indicator, bitbake
can parse it and will show the user how the rust build is progressing.
This addition closes#236 requesting the SDK support. The implementation
consists on a yet minimum set of worky functionality;
- Includes rustc, rustdoc and cargo.
- Includes libstd and accompanying lib archives for host and for target.
- Integrates with the standard environment setup script.
- Integrates configurations automatically build for target.
The supported build host is still AMD64 only.
Note that there's no need on introducing crosssdk package as the
official snapshot package serves same way as a non SDK build.
Possible future directions:
- Offline build:
- Support pre-cached set of crates that can be vendored.
- Support pre-filled cargo registry.
- Support further tools like cargo-fmt, cargo-clippy, GDB support and so
on.
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
Place generated artifacts in the directory suggested by bitbake (${B})
instead of directly in the source directory. This has multiple
advantages such as the ability to share source directory between
multiple machine types without risking cross contamination.
This solves SSL CA cert errors.
When a sstate-cache is used sometimes the certificates are not available
at the compile time path anymore. The required certificates are
available in sysroot-native and can be selected with the cainfo
configuration.
Since 1.31.0 cargo requires curl to support http2. Enabling http2 in
curl results in a dependency loop. This commit disables the use of
multiplexing and http2.
Because devtool inhibits all the normal bitbake fetchers, we can't mask crates.io.
Use EXTERNALSRC to detect if we're being built with devtool, and only mask
crates.io if we're not.
Fixes#195
rustbuild is a cargo based way to build Rust but all of our helper bits
in cargo.bbclass would create a chicken/egg issue with dependencies
since we pull down pre-built binaries and use those for boot strapping.