aboutsummaryrefslogtreecommitdiff
path: root/lang/rust
Commit message (Collapse)AuthorAge
* rust: Update to 1.72.0Tianling Shen2023-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Version 1.72.0 (2023-08-24) ========================== Language -------- - [Replace const eval limit by a lint and add an exponential backoff warning](https://github.com/rust-lang/rust/pull/103877/) - [expand: Change how `#![cfg(FALSE)]` behaves on crate root](https://github.com/rust-lang/rust/pull/110141/) - [Stabilize inline asm for LoongArch64](https://github.com/rust-lang/rust/pull/111235/) - [Uplift `clippy::undropped_manually_drops` lint](https://github.com/rust-lang/rust/pull/111530/) - [Uplift `clippy::invalid_utf8_in_unchecked` lint](https://github.com/rust-lang/rust/pull/111543/) - [Uplift `clippy::cast_ref_to_mut` lint](https://github.com/rust-lang/rust/pull/111567/) - [Uplift `clippy::cmp_nan` lint](https://github.com/rust-lang/rust/pull/111818/) - [resolve: Remove artificial import ambiguity errors](https://github.com/rust-lang/rust/pull/112086/) - [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](https://github.com/rust-lang/rust/pull/112319/) Compiler -------- - [Remember names of `cfg`-ed out items to mention them in diagnostics](https://github.com/rust-lang/rust/pull/109005/) - [Support for native WASM exceptions](https://github.com/rust-lang/rust/pull/111322/) - [Add support for NetBSD/aarch64-be (big-endian arm64).](https://github.com/rust-lang/rust/pull/111326/) - [Write to stdout if `-` is given as output file](https://github.com/rust-lang/rust/pull/111626/) - [Force all native libraries to be statically linked when linking a static binary](https://github.com/rust-lang/rust/pull/111698/) - [Add Tier 3 support for `loongarch64-unknown-none*`](https://github.com/rust-lang/rust/pull/112310/) - [Prevent `.eh_frame` from being emitted for `-C panic=abort`](https://github.com/rust-lang/rust/pull/112403/) - [Support 128-bit enum variant in debuginfo codegen](https://github.com/rust-lang/rust/pull/112474/) - [compiler: update solaris/illumos to enable tsan support.](https://github.com/rust-lang/rust/pull/112039/) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Document memory orderings of `thread::{park, unpark}`](https://github.com/rust-lang/rust/pull/99587/) - [io: soften ‘at most one write attempt’ requirement in io::Write::write](https://github.com/rust-lang/rust/pull/107200/) - [Specify behavior of HashSet::insert](https://github.com/rust-lang/rust/pull/107619/) - [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](https://github.com/rust-lang/rust/pull/111074/) - [Update runtime guarantee for `select_nth_unstable`](https://github.com/rust-lang/rust/pull/111974/) - [Return `Ok` on kill if process has already exited](https://github.com/rust-lang/rust/pull/112594/) - [Implement PartialOrd for `Vec`s over different allocators](https://github.com/rust-lang/rust/pull/112632/) - [Use 128 bits for TypeId hash](https://github.com/rust-lang/rust/pull/109953/) - [Don't drain-on-drop in DrainFilter impls of various collections.](https://github.com/rust-lang/rust/pull/104455/) - [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](https://github.com/rust-lang/rust/pull/106450/) Rustdoc ------- - [Allow whitespace as path separator like double colon](https://github.com/rust-lang/rust/pull/108537/) - [Add search result item types after their name](https://github.com/rust-lang/rust/pull/110688/) - [Search for slices and arrays by type with `[]`](https://github.com/rust-lang/rust/pull/111958/) - [Clean up type unification and "unboxing"](https://github.com/rust-lang/rust/pull/112233/) Stabilized APIs --------------- - [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E) - [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str) - [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak) These APIs are now stable in const contexts: - [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul) - [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul) - [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul) - [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul) Cargo ----- - Enable `-Zdoctest-in-workspace` by default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests) [#12221](https://github.com/rust-lang/cargo/pull/12221) [#12288](https://github.com/rust-lang/cargo/pull/12288) - Add support of the "default" keyword to reset previously set `build.jobs` parallelism back to the default. [#12222](https://github.com/rust-lang/cargo/pull/12222) Compatibility Notes ------------------- - [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](https://github.com/rust-lang/rust/pull/112606/) - Cargo changed feature name validation check to a hard error. The warning was added in Rust 1.49. These extended characters aren't allowed on crates.io, so this should only impact users of other registries, or people who don't publish to a registry. [#12291](https://github.com/rust-lang/cargo/pull/12291) Refreshed patches. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: correct mistake in previous host-build fixJonas Jelonek2023-08-19
| | | | | | | | | | | Fixes the commit 105fa3920e which was intended to make rust/host build on aarch64 darwin working again. However, the fix contains a mistake because it sets RUSTC_TARGET_ARCH instead of RUSTC_HOST_ARCH. Thus, the fix doesn't work. This properly sets the correct variable RUSTC_HOST_ARCH. Fixes: 105fa3920e ("rust: fix host build on aarch64 darwin") Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
* rust: fix host build on aarch64 darwinJonas Jelonek2023-08-17
| | | | | | | | | | | | rust/host failed to compile on macOS running on Apple Silicon M1 Pro because the host target triple is autogenerated to be 'arm64-unknown-linux-'. Rust doesn't have such a target triple, thus the build failes because there are no pre-built artifacts for bootstrapping. Fix this by setting RUSTC_HOST_ARCH to 'aarch64-apple-darwin' in case our host is HOST_ARCH=arm64 and HOST_OS=darwin. Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
* rust: Update to 1.71.1Tianling Shen2023-08-07
| | | | | | | | | | | | | | Version 1.71.1 (2023-08-03) =========================== - Fix CVE-2023-38497: Cargo did not respect the umask when extracting dependencies - Fix bash completion for users of Rustup - Do not show `suspicious_double_ref_op` lint when calling `borrow()` - Fix ICE: substitute types before checking inlining compatibility - Fix ICE: don't use `can_eq` in `derive(..)` suggestion for missing method - Fix building Rust 1.71.0 from the source tarball Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: put host build dir to target build dirTianling Shen2023-07-23
| | | | | | | | | | | | | | | | When user runs `make clean` command, everything in `$(STAGING_DIR)` (where we installed rust) will be removed, but `$(BUILD_DIR_HOST)` (where we compiled rust and stored build stage) is untouched. So when user starts a new build after that, OpenWrt buildroot will still consider `rust` is installed already, resulting the build error "cargo: command not found". Fix this by moving to target build dir as well. Fixes: f489e019ac4a ("rust: compile host package per target") Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: Update to 1.71.0Tianling Shen2023-07-18
| | | | | | Refreshed patches. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* 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: bump libc to 0.2.146Tianling Shen2023-06-07
| | | | | | Fixes build with musl 1.2.4. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: update to 1.70.0Luca Barbato2023-06-05
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rust: update to 1.69.0Luca Barbato2023-04-21
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rust: update to 1.68.2Luca Barbato2023-04-03
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.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: enable use of prebuilt llvm toolchainTianling Shen2023-03-24
| | | | | | | llvm-bpf is not ready for generic usage, so use prebuilt llvm toolchain provided by the rust project to speedup build (~1hour faster). Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* maturin: adapt new rust build standardTianling Shen2023-03-24
| | | | | | While at it, move maturin out of rust directory. 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>
* rust: remove useless target dependencies and configurationTianling Shen2023-03-24
| | | | | | They are for the target build which is not supported yet, drop them. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust: remove useless tarball packageTianling Shen2023-03-24
| | | | | | | | These tarball cannot be reused, so simply drop them. Also move cargo config to a file instead of using echo command. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* rust-lang: update to 1.68.0Luca Barbato2023-03-13
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rust-lang: Add an Host/Compile helper as wellLuca Barbato2023-03-10
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rust-lang: Apply suggestions from code reviewLuca Barbato2023-03-10
| | | | | Co-authored-by: Tianling Shen <cnsztl@gmail.com> Signed-off-by: Luca Barbato <luca.barbato@gmail.com>
* maturin: Add packageLuca Barbato2023-03-10
| | | | | | Build tool for rust-python packages. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rust-lang: Add the rust language supportLuca Barbato2023-03-10
Based on work from Donald Hoskins <grommish@gmail.com>. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>