aboutsummaryrefslogtreecommitdiff
path: root/lang/rust/rust-values.mk
Commit message (Collapse)AuthorAge
* rust: compile host package per targetOrne Brocaar2023-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | While the compiled binaries are intended to run on the host system, the rust/host package does include the target matching the configured OpenWrt target. If using (for example) ./scripts/env to switch between different OpenWrt configurations, this will cause issues if the different configuration is for a different target. In such case there will be a mismatch between the available Rust target and OpenWrt target and the following error will be printed: > error[E0463]: can't find crate for `core` > note: the `XXX` target may not be installed This fix will add the RUSTC_TARGET_ARCH as HOST_BUILD_DIR and CARGO_HOME suffix, such that rust/host will be compiled in case an OpenWrt configuration change causes the RUSTC_TARGET_ARCH to change. Fixes: #21530 Signed-off-by: Orne Brocaar <info@brocaar.com> [Applied Jeffery To's suggestion for build and install path] Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: enable riscv64 supportTianling Shen2023-06-07
| | | | | | rust natively supports riscv64 so let's enable it. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: update to 1.68.1Oskari Rauta2023-03-31
| | | | | | | | | also add new variable CARGO_VARS to make it possible to pass environment variables for cargo process. This is necessary when for example, cross-compiling netavark. Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
* rust: fix build with glibcTianling Shen2023-03-24
| | | | | | Don't set musl-specific options/ldflags when using glibc. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: refactor build helperTianling Shen2023-03-24
Added new RustBinPackage, RustBinHostBuild wrapper. Added new RUST_PKG_FEATURES flag. Moved CARGO_HOME to STAGING_DIR_HOSTPKG. Overrode default Build/Compile and Host/Compile to Cargo build. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>