[GIT PULL] Rust for 6.3
From: Miguel Ojeda
Date: Sun Feb 12 2023 - 13:33:06 EST
Hi Linus,
A new set of features for the Rust support.
By the time you pick this, these commits will have been in linux-next
for quite a while. No conflicts expected. No changes to the C side.
Please pull for v6.3 -- thanks!
Cheers,
Miguel
The following changes since commit 5dc4c995db9eb45f6373a956eb1f69460e69e6d4:
Linux 6.2-rc4 (2023-01-15 09:22:43 -0600)
are available in the Git repository at:
https://github.com/Rust-for-Linux/linux tags/rust-6.3
for you to fetch changes up to 7ea01d3169a28d090fc8f22e7fcb4e4f1090c2d2:
rust: delete rust-project.json when running make clean (2023-02-07 11:24:50 +0100)
----------------------------------------------------------------
Rust changes for v6.3
More core additions, getting closer to a point where the first Rust
modules can be upstreamed. The major ones being:
- Sync: new types 'Arc', 'ArcBorrow' and 'UniqueArc'.
- Types: new trait 'ForeignOwnable' and new type 'ScopeGuard'.
There is also a substantial removal in terms of lines:
- 'alloc' crate: remove the 'borrow' module (type 'Cow' and trait
'ToOwned').
----------------------------------------------------------------
Boqun Feng (1):
rust: MAINTAINERS: Add the zulip link
Finn Behrens (1):
rust: prelude: prevent doc inline of external imports
Gary Guo (1):
rust: compiler_builtins: make stubs non-global
Maíra Canal (1):
rust: delete rust-project.json when running make clean
Miguel Ojeda (1):
rust: alloc: remove the `borrow` module (`ToOwned`, `Cow`)
Wedson Almeida Filho (12):
rust: sync: add `Arc` for ref-counted allocations
rust: sync: allow type of `self` to be `Arc<T>` or variants
rust: sync: allow coercion from `Arc<T>` to `Arc<U>`
rust: sync: introduce `ArcBorrow`
rust: sync: allow type of `self` to be `ArcBorrow<T>`
rust: sync: introduce `UniqueArc`
rust: sync: add support for dispatching on Arc and ArcBorrow.
rust: types: introduce `ScopeGuard`
rust: types: introduce `ForeignOwnable`
rust: types: implement `ForeignOwnable` for `Box<T>`
rust: types: implement `ForeignOwnable` for the unit type
rust: types: implement `ForeignOwnable` for `Arc<T>`
MAINTAINERS | 1 +
Makefile | 2 +-
rust/Makefile | 15 ++
rust/alloc/borrow.rs | 498 --------------------------------------
rust/alloc/lib.rs | 3 +-
rust/alloc/vec/mod.rs | 3 +
rust/bindings/bindings_helper.h | 1 +
rust/bindings/lib.rs | 1 +
rust/compiler_builtins.rs | 5 +-
rust/helpers.c | 19 ++
rust/kernel/lib.rs | 6 +
rust/kernel/prelude.rs | 8 +-
rust/kernel/sync.rs | 10 +
rust/kernel/sync/arc.rs | 524 ++++++++++++++++++++++++++++++++++++++++
rust/kernel/types.rs | 215 ++++++++++++++++-
15 files changed, 808 insertions(+), 503 deletions(-)
delete mode 100644 rust/alloc/borrow.rs
create mode 100644 rust/kernel/sync.rs
create mode 100644 rust/kernel/sync/arc.rs