Skip to content

Commit

Permalink
Add a package for rust version 1.77.0.
Browse files Browse the repository at this point in the history
Pkgsrc changes:
 * Adapt checksums and patches.

Upstream chnages:

Version 1.77.0 (2024-03-21)
==========================

- [Reveal opaque types within the defining body for exhaustiveness checking.]
  (rust-lang/rust#116821)
- [Stabilize C-string literals.]
  (rust-lang/rust#117472)
- [Stabilize THIR unsafeck.]
  (rust-lang/rust#117673)
- [Add lint `static_mut_refs` to warn on references to mutable statics.]
  (rust-lang/rust#117556)
- [Support async recursive calls (as long as they have indirection).]
  (rust-lang/rust#117703)
- [Undeprecate lint `unstable_features` and make use of it in the compiler.]
  (rust-lang/rust#118639)
- [Make inductive cycles in coherence ambiguous always.]
  (rust-lang/rust#118649)
- [Get rid of type-driven traversal in const-eval interning]
  (rust-lang/rust#119044),
  only as a [future compatiblity lint]
  (rust-lang/rust#122204) for now.
- [Deny braced macro invocations in let-else.]
  (rust-lang/rust#119062)

Compiler
--------

- [Include lint `soft_unstable` in future breakage reports.]
  (rust-lang/rust#116274)
- [Make `i128` and `u128` 16-byte aligned on x86-based targets.]
  (rust-lang/rust#116672)
- [Use `--verbose` in diagnostic output.]
  (rust-lang/rust#119129)
- [Improve spacing between printed tokens.]
  (rust-lang/rust#120227)
- [Merge the `unused_tuple_struct_fields` lint into `dead_code`.]
  (rust-lang/rust#118297)
- [Error on incorrect implied bounds in well-formedness check]
  (rust-lang/rust#118553),
  with a temporary exception for Bevy.
- [Fix coverage instrumentation/reports for non-ASCII source code.]
  (rust-lang/rust#119033)
- [Fix `fn`/`const` items implied bounds and well-formedness check.]
  (rust-lang/rust#120019)
- [Promote `riscv32{im|imafc}-unknown-none-elf` targets to tier 2.]
  (rust-lang/rust#118704)
- Add several new tier 3 targets:
  - [`aarch64-unknown-illumos`]
    (rust-lang/rust#112936)
  - [`hexagon-unknown-none-elf`]
    (rust-lang/rust#117601)
  - [`riscv32imafc-esp-espidf`]
    (rust-lang/rust#119738)
  - [`riscv32im-risc0-zkvm-elf`]
    (rust-lang/rust#117958)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------

- [Implement `From<&[T; N]>` for `Cow<[T]>`.]
  (rust-lang/rust#113489)
- [Remove special-case handling of `vec.split_off
  (0)`.](rust-lang/rust#119917)

Stabilized APIs
---------------

- [`array::each_ref`]
  (https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_ref)
- [`array::each_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut)
- [`core::net`]
  (https://doc.rust-lang.org/stable/core/net/index.html)
- [`f32::round_ties_even`]
  (https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round_ties_even)
- [`f64::round_ties_even`]
  (https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round_ties_even)
- [`mem::offset_of!`]
  (https://doc.rust-lang.org/stable/std/mem/macro.offset_of.html)
- [`slice::first_chunk`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first_chunk)
- [`slice::first_chunk_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first_chunk_mut)
- [`slice::split_first_chunk`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first_chunk)
- [`slice::split_first_chunk_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first_chunk_mut)
- [`slice::last_chunk`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last_chunk)
- [`slice::last_chunk_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last_chunk_mut)
- [`slice::split_last_chunk`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last_chunk)
- [`slice::split_last_chunk_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last_chunk_mut)
- [`slice::chunk_by`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.chunk_by)
- [`slice::chunk_by_mut`]
  (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.chunk_by_mut)
- [`Bound::map`]
  (https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.map)
- [`File::create_new`]
  (https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.create_new)
- [`Mutex::clear_poison`]
  (https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html#method.clear_poison)
- [`RwLock::clear_poison`]
  (https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html#method.clear_poison)

Cargo
-----

- [Extend the build directive syntax with `cargo::`.]
  (rust-lang/cargo#12201)
- [Stabilize metadata `id` format as `PackageIDSpec`.]
  (rust-lang/cargo#12914)
- [Pull out as `cargo-util-schemas` as a crate.]
  (rust-lang/cargo#13178)
- [Strip all debuginfo when debuginfo is not requested.]
  (rust-lang/cargo#13257)
- [Inherit jobserver from env for all kinds of runners.]
  (rust-lang/cargo#12776)
- [Deprecate rustc plugin support in cargo.]
  (rust-lang/cargo#13248)

Rustdoc
-----

- [Allows links in markdown headings.]
  (rust-lang/rust#117662)
- [Search for tuples and unit by type with `()`.]
  (rust-lang/rust#118194)
- [Clean up the source sidebar's hide button.]
  (rust-lang/rust#119066)
- [Prevent JS injection from `localStorage`.]
  (rust-lang/rust#120250)

Misc
----

- [Recommend version-sorting for all sorting in style guide.]
  (rust-lang/rust#115046)

Internal Changes
----------------

These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.

- [Add more weirdness to `weird-exprs.rs`.]
  (rust-lang/rust#119028)
  • Loading branch information
he32 committed Mar 29, 2024
1 parent 48fdfba commit bb89963
Show file tree
Hide file tree
Showing 59 changed files with 2,906 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rust177/DESCR
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Rust is a systems programming language focused on three goals: safety,
speed, and concurrency. It maintains these goals without having a
garbage collector, making it a useful language for a number of use cases
other languages aren't good at: embedding in other languages, programs
with specific space and time requirements, and writing low-level code,
like device drivers and operating systems.

It improves on current languages targeting this space by having a number
of compile-time safety checks that produce no runtime overhead, while
eliminating all data races. Rust also aims to achieve "zero-cost
abstractions" even though some of these abstractions feel like those of
a high-level language. Even then, Rust still allows precise control
like a low-level language would.
85 changes: 85 additions & 0 deletions rust177/HOWTO-BOOTSTRAP
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
How to build a rust bootstrap kit using pkgsrc
----------------------------------------------

A rust bootstrap kit is simply a pre-compiled binary of rust and
the rust standard library, and contains the "rust" and "rust-std"
build results, found in

work/rustc-<version>/build/dist/
as
rust-<version>-<target>.tar.xz
and
rust-std-<version>-<target>.tar.xz

These result files are produced when the "dist" build target is
used, ref. BUILD_TARGET. For a normal native build of the rust
pkgsrc package, the default BUILD_TARGET is "build", not "dist".

There are two possible ways to produce a bootstrap kit:

1) a native build. This requires minimum preparation, except
possibly for setting rust.BUILD_TARGET to "dist" via e.g.
/etc/mk.conf. Note that on NetBSD, using the "BUILD_TARGET" ==
"dist" results in the "rust-cargo-static" option being set, ref.
options.mk. This is so that the resulting bootstrap kits are
built with mostly-static linking, reducing the run-time dependencies
of the bootstrap kits.

2) a cross-build. This requires a bit of preparation:

For each target you want to cross-build rust for, you need
- the cross toolchain resulting from "build.sh tools" for
the intended target
- an OS distribution extracted, including the comp.tgz
set so that the target's include files can be used
- for 32-bit ports, the "libatomic" package needs to be
available. I'm sure there's a clever and long-winded
use of pkg_install which can be used to effect this;
I on my hand have always just extracted the tgz file
and done the minimal cleanup of the "cruft" files
which are part of the package meta-data.
- Pick a root directory for the target, e.g. /u/i386.
Below this directory place the "tools" containing
the cross-compiler in a "tools" sub-directory.
Similarly, the extracted OS distribution in the "dest"
sub-directory.

There are two methods available for doing the cross-compile:

a) Using the "cross.mk" file. For an i386 build against i586, the
following settings should be active:

CROSS_ROOT= /u/i386
MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
GNU_CROSS_TARGET= i486--netbsdelf
MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
TARGET= i586-unknown-netbsd
SCRIPTS= ${WRKDIR}/scripts
CONFIGURE_ARGS+= --host=${TARGET}
CONFIGURE_ARGS+= --target=${TARGET}
CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar

Then doing a "make" will cross-build rust, including the LLVM
embedded in the rust distribution, ref. the defaulting of that
option when TARGET is defined ref. options.mk.

Note that when TARGET is set, the default build target for
the rust makefile becomes "dist", so there's no need to set
rust.BUILD_TARGET for cross-builds.

b) Using the "do-cross.mk" Makefile. This will attempt to
cross-build rust for all the targets listed in the SHORT_TARGETS
variable in that file. Overriding the root directories for
the various targets can be done by making your own "local-roots.mk"
file, ref. "do-cross.mk".

This will create a "dist" subdirectory in the rust pkgsrc
directory, and the bootstrap kits for each architecture, plus
the library source kit will be placed in this directory.

The bootstrap kits can then be placed in /usr/pkgsrc/distfiles, and
be used by the "next" rust version, where you can use "make makesum"
to compute the updated checksums for the bootstrap kits.

0 comments on commit bb89963

Please sign in to comment.