Skip to content

Commit 8d94680

Browse files
committed
rust188: add a package for rust 1.88.0.
Pkgsrc changes: * Adjust patches to adapt to upstream changes and new versions. * associated checksums Upstream changes relative to 1.87.0: Version 1.88.0 (2025-06-26) ========================== Language -------- - [Stabilize `#![feature(let_chains)]` in the 2024 edition.] (rust-lang/rust#132833) This feature allows `&&`-chaining `let` statements inside `if` and `while`, allowing intermixture with boolean expressions. The patterns inside the `let` sub-expressions can be irrefutable or refutable. - [Stabilize `#![feature(naked_functions)]`.] (rust-lang/rust#134213) Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. - [Stabilize `#![feature(cfg_boolean_literals)]`.] (rust-lang/rust#138632) This allows using boolean literals as `cfg` predicates, e.g. `#[cfg(true)]` and `#[cfg(false)]`. - [Fully de-stabilize the `#[bench]` attribute] (rust-lang/rust#134273). Usage of `#[bench]` without `#![feature(custom_test_frameworks)]` already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. - [Add warn-by-default `dangerous_implicit_autorefs` lint against implicit autoref of raw pointer dereference.] (rust-lang/rust#123239) The lint [will be bumped to deny-by-default] (rust-lang/rust#141661) in the next version of Rust. - [Add `invalid_null_arguments` lint to prevent invalid usage of null pointers.] (rust-lang/rust#119220) This lint is uplifted from `clippy::invalid_null_ptr_usage`. - [Change trait impl candidate preference for builtin impls and trivial where-clauses.] (rust-lang/rust#138176) - [Check types of generic const parameter defaults] (rust-lang/rust#139646) Compiler -------- - [Stabilize `-Cdwarf-version` for selecting the version of DWARF debug information to generate.] (rust-lang/rust#136926) Platform Support ---------------- - [Demote `i686-pc-windows-gnu` to Tier 2.] (https://blog.rust-lang.org/2025/05/26/demoting-i686-pc-windows-gnu/) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html Libraries --------- - [Remove backticks from `#[should_panic]` test failure message.] (rust-lang/rust#136160) - [Guarantee that `[T; N]::from_fn` is generated in order of increasing indices.] (rust-lang/rust#139099), for those passing it a stateful closure. - [The libtest flag `--nocapture` is deprecated in favor of the more consistent `--no-capture` flag.] (rust-lang/rust#139224) - [Guarantee that `{float}::NAN` is a quiet NaN.] (rust-lang/rust#139483) Stabilized APIs --------------- - [`Cell::update`] (https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update) - [`impl Default for *const T`] (https://doc.rust-lang.org/nightly/std/primitive.pointer.html#impl-Default-for-*const+T) - [`impl Default for *mut T`] (https://doc.rust-lang.org/nightly/std/primitive.pointer.html#impl-Default-for-*mut+T) - [`HashMap::extract_if`] (https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.extract_if) - [`HashSet::extract_if`] (https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.extract_if) - [`proc_macro::Span::line`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.line) - [`proc_macro::Span::column`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.column) - [`proc_macro::Span::start`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.start) - [`proc_macro::Span::end`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end) - [`proc_macro::Span::file`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file) - [`proc_macro::Span::local_file`] (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file) These previously stable APIs are now stable in const contexts: - [`NonNull<T>::replace`] (https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.replace) - [`<*mut T>::replace`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.replace) - [`std::ptr::swap_nonoverlapping`] (rust-lang/rust#137280) - [`Cell::{replace, get, get_mut, from_mut, as_slice_of_cells}`] (rust-lang/rust#137928) Cargo ----- - [Stabilize automatic garbage collection.] (rust-lang/cargo#14287) - [use `zlib-rs` for gzip compression in rust code] (rust-lang/cargo#15417) Rustdoc ----- - [Doctests can be ignored based on target names using `ignore-*` attributes.] (rust-lang/rust#137096) - [Stabilize the `--test-runtool` and `--test-runtool-arg` CLI options to specify a program (like qemu) and its arguments to run a doctest.] (rust-lang/rust#137096) Compatibility Notes ------------------- - [Finish changing the internal representation of pasted tokens] (rust-lang/rust#124141). Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a `tt` fragment specifier can often fix these macros. - [Fully de-stabilize the `#[bench]` attribute] (rust-lang/rust#134273). Usage of `#[bench]` without `#![feature(custom_test_frameworks)]` already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. - [Fix borrow checking some always-true patterns.] (rust-lang/rust#139042) The borrow checker was overly permissive in some cases, allowing programs that shouldn't have compiled. - [Update the minimum external LLVM to 19.] (rust-lang/rust#139275) - [Make it a hard error to use a vector type with a non-Rust ABI without enabling the required target feature.] (rust-lang/rust#139309)
1 parent c163589 commit 8d94680

File tree

76 files changed

+3872
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3872
-0
lines changed

rust188/DESCR

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Rust is a systems programming language focused on three goals: safety,
2+
speed, and concurrency. It maintains these goals without having a
3+
garbage collector, making it a useful language for a number of use cases
4+
other languages aren't good at: embedding in other languages, programs
5+
with specific space and time requirements, and writing low-level code,
6+
like device drivers and operating systems.
7+
8+
It improves on current languages targeting this space by having a number
9+
of compile-time safety checks that produce no runtime overhead, while
10+
eliminating all data races. Rust also aims to achieve "zero-cost
11+
abstractions" even though some of these abstractions feel like those of
12+
a high-level language. Even then, Rust still allows precise control
13+
like a low-level language would.

rust188/HOWTO-BOOTSTRAP

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
How to build a rust bootstrap kit using pkgsrc
2+
----------------------------------------------
3+
4+
A rust bootstrap kit is simply a pre-compiled binary of rust and
5+
the rust standard library, and contains the "rust" and "rust-std"
6+
build results, found in
7+
8+
work/rustc-<version>/build/dist/
9+
as
10+
rust-<version>-<target>.tar.xz
11+
and
12+
rust-std-<version>-<target>.tar.xz
13+
14+
These result files are produced when the "dist" build target is
15+
used, ref. BUILD_TARGET. For a normal native build of the rust
16+
pkgsrc package, the default BUILD_TARGET is "build", not "dist".
17+
18+
There are two possible ways to produce a bootstrap kit:
19+
20+
1) a native build. This requires minimum preparation, except
21+
possibly for setting rust.BUILD_TARGET to "dist" via e.g.
22+
/etc/mk.conf. Note that on NetBSD, using the "BUILD_TARGET" ==
23+
"dist" results in the "rust-cargo-static" option being set, ref.
24+
options.mk. This is so that the resulting bootstrap kits are
25+
built with mostly-static linking, reducing the run-time dependencies
26+
of the bootstrap kits.
27+
28+
2) a cross-build. This requires a bit of preparation:
29+
30+
For each target you want to cross-build rust for, you need
31+
- the cross toolchain resulting from "build.sh tools" for
32+
the intended target
33+
- an OS distribution extracted, including the comp.tgz
34+
set so that the target's include files can be used
35+
- for 32-bit ports, the "libatomic" package needs to be
36+
available. I'm sure there's a clever and long-winded
37+
use of pkg_install which can be used to effect this;
38+
I on my hand have always just extracted the tgz file
39+
and done the minimal cleanup of the "cruft" files
40+
which are part of the package meta-data.
41+
- Pick a root directory for the target, e.g. /u/i386.
42+
Below this directory place the "tools" containing
43+
the cross-compiler in a "tools" sub-directory.
44+
Similarly, the extracted OS distribution in the "dest"
45+
sub-directory.
46+
47+
There are two methods available for doing the cross-compile:
48+
49+
a) Using the "cross.mk" file. For an i386 build against i586, the
50+
following settings should be active:
51+
52+
CROSS_ROOT= /u/i386
53+
MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
54+
GNU_CROSS_TARGET= i486--netbsdelf
55+
MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
56+
TARGET= i586-unknown-netbsd
57+
SCRIPTS= ${WRKDIR}/scripts
58+
CONFIGURE_ARGS+= --host=${TARGET}
59+
CONFIGURE_ARGS+= --target=${TARGET}
60+
CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
61+
CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
62+
CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
63+
CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
64+
65+
Then doing a "make" will cross-build rust, including the LLVM
66+
embedded in the rust distribution, ref. the defaulting of that
67+
option when TARGET is defined ref. options.mk.
68+
69+
Note that when TARGET is set, the default build target for
70+
the rust makefile becomes "dist", so there's no need to set
71+
rust.BUILD_TARGET for cross-builds.
72+
73+
b) Using the "do-cross.mk" Makefile. This will attempt to
74+
cross-build rust for all the targets listed in the SHORT_TARGETS
75+
variable in that file. Overriding the root directories for
76+
the various targets can be done by making your own "local-roots.mk"
77+
file, ref. "do-cross.mk".
78+
79+
This will create a "dist" subdirectory in the rust pkgsrc
80+
directory, and the bootstrap kits for each architecture, plus
81+
the library source kit will be placed in this directory.
82+
83+
The bootstrap kits can then be placed in /usr/pkgsrc/distfiles, and
84+
be used by the "next" rust version, where you can use "make makesum"
85+
to compute the updated checksums for the bootstrap kits.

0 commit comments

Comments
 (0)