rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] Rust for 6.5
Date: Sun, 18 Jun 2023 18:15:58 +0200	[thread overview]
Message-ID: <20230618161558.1051269-1-ojeda@kernel.org> (raw)

Hi Linus,

This is the next round of the Rust support.

All commits have been in linux-next for more than 2 weeks, except the
last which has been there for 4 days.

No conflicts expected. No changes to the C side.

Please pull for v6.5 -- thanks!

Cheers,
Miguel


The following changes since commit 7877cb91f1081754a1487c144d85dc0d2e2e7fc4:

  Linux 6.4-rc4 (2023-05-28 07:49:00 -0400)

are available in the Git repository at:

  https://github.com/Rust-for-Linux/linux.git tags/rust-6.5

for you to fetch changes up to d2e3115d717197cb2bc020dd1f06b06538474ac3:

  rust: error: `impl Debug` for `Error` with `errname()` integration (2023-06-13 01:24:42 +0200)

----------------------------------------------------------------
Rust changes for v6.5

A fairly small one in terms of feature additions. Most of the changes in
terms of lines come from the upgrade to the new version of the toolchain
(which in turn is big due to the vendored 'alloc' crate).

 - Upgrade to Rust 1.68.2:

   This is the first such upgrade, and we will try to update it often
   from now on, in order to remain close to the latest release, until
   a minimum version (which is "in the future") can be established.

   The upgrade brings the stabilization of 4 features we used (and 2
   more that we used in our old 'rust' branch).

   Commit 3ed03f4da06e ("rust: upgrade to Rust 1.68.2") contains the
   details and rationale.

 - pin-init API:

   Several internal improvements and fixes to the pin-init API, e.g.
   allowing to use 'Self' in a struct definition with '#[pin_data]'.

 - 'error'  module:

   New 'name()' method for the 'Error' type (with 'errname()'
   integration), used to implement the 'Debug' trait for 'Error'.

   Add error codes from 'include/linux/errno.h' to the list of Rust
   'Error' constants.

   Allow specifying error type on the 'Result' type (with the default
   still being our usual 'Error' type).

 - 'str' module:

   'TryFrom' implementation for 'CStr', and new 'to_cstring()' method
   based on it.

 - 'sync' module:

   Implement 'AsRef' trait for 'Arc', allowing to use 'Arc' in code that
   is generic over smart pointer types.

   Add 'ptr_eq' method to 'Arc' for easier, less error prone comparison
   between two 'Arc' pointers.

   Reword the 'Send' safety comment for 'Arc', and avoid referencing it
   from the 'Sync' one.

 - 'task' module:

   Implement 'Send' marker for 'Task'.

 - 'types' module:

   Implement 'Send' and 'Sync' markers for 'ARef<T>' when 'T' is
   'AlwaysRefCounted', 'Send' and 'Sync'.

 - Other changes:

   Documentation improvements and '.gitattributes' change to start
   using the Rust diff driver.

----------------------------------------------------------------
Alice Ryhl (9):
      rust: error: allow specifying error type on `Result`
      rust: str: add conversion from `CStr` to `CString`
      rust: error: add missing error codes
      rust: sync: add `Arc::ptr_eq`
      rust: sync: implement `AsRef<T>` for `Arc<T>`
      rust: sync: reword the `Arc` safety comment for `Send`
      rust: sync: reword the `Arc` safety comment for `Sync`
      rust: specify when `ARef` is thread safe
      rust: task: add `Send` marker to `Task`

Benno Lossin (4):
      rust: macros: fix usage of `#[allow]` in `quote!`
      rust: macros: refactor generics parsing of `#[pin_data]` into its own function
      rust: macros: replace Self with the concrete type in #[pin_data]
      rust: init: update macro expansion example in docs

Gary Guo (1):
      rust: error: `impl Debug` for `Error` with `errname()` integration

Miguel Ojeda (5):
      rust: alloc: clarify what is the upstream version
      rust: arc: fix intra-doc link in `Arc<T>::init`
      rust: upgrade to Rust 1.68.2
      .gitattributes: set diff driver for Rust source code files
      docs: rust: point directly to the standalone installers

 .gitattributes                     |   1 +
 Documentation/process/changes.rst  |   2 +-
 Documentation/rust/quick-start.rst |   4 +-
 rust/alloc/README.md               |   3 +
 rust/alloc/alloc.rs                |  55 +++--
 rust/alloc/boxed.rs                | 446 +++++++++++++++++++++++++++++++++--
 rust/alloc/collections/mod.rs      |   5 +-
 rust/alloc/lib.rs                  |  71 ++++--
 rust/alloc/raw_vec.rs              |  16 +-
 rust/alloc/slice.rs                | 447 +++++------------------------------
 rust/alloc/vec/drain.rs            |  81 ++++++-
 rust/alloc/vec/drain_filter.rs     |  60 ++++-
 rust/alloc/vec/into_iter.rs        | 125 +++++++---
 rust/alloc/vec/is_zero.rs          |  96 +++++++-
 rust/alloc/vec/mod.rs              | 464 ++++++++++++++++++++++++++++---------
 rust/alloc/vec/set_len_on_drop.rs  |   5 +
 rust/alloc/vec/spec_extend.rs      |  63 +----
 rust/bindings/bindings_helper.h    |   1 +
 rust/bindings/lib.rs               |   1 -
 rust/helpers.c                     |   7 +
 rust/kernel/build_assert.rs        |   2 +
 rust/kernel/error.rs               |  61 ++++-
 rust/kernel/init.rs                |   5 +
 rust/kernel/init/macros.rs         |  85 ++++---
 rust/kernel/lib.rs                 |   4 -
 rust/kernel/std_vendor.rs          |   2 +
 rust/kernel/str.rs                 |  22 ++
 rust/kernel/sync/arc.rs            |  25 +-
 rust/kernel/task.rs                |  10 +-
 rust/kernel/types.rs               |  13 ++
 rust/macros/helpers.rs             |  86 ++++++-
 rust/macros/pin_data.rs            | 168 +++++++++-----
 rust/macros/quote.rs               |  14 +-
 rust/uapi/lib.rs                   |   1 -
 scripts/Makefile.build             |   2 +-
 scripts/min-tool-version.sh        |   2 +-
 36 files changed, 1659 insertions(+), 796 deletions(-)

             reply	other threads:[~2023-06-18 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 16:15 Miguel Ojeda [this message]
2023-06-26 17:34 ` [GIT PULL] Rust for 6.5 pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230618161558.1051269-1-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wedsonaf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).