[PATCH 0/5] Rework index projection syntax

Gary Guo posted 5 patches 2 months ago
There is a newer version of this series
drivers/gpu/nova-core/gsp/cmdq.rs | 108 +++++++++++++++++++++-----------------
rust/kernel/dma.rs                |  15 +++---
rust/kernel/ptr/projection.rs     |  90 +++++++++++++++++++++++++------
samples/rust/rust_dma.rs          |  12 ++---
4 files changed, 145 insertions(+), 80 deletions(-)
[PATCH 0/5] Rework index projection syntax
Posted by Gary Guo 2 months ago
This series reworks the index projection syntax in the pointer
projection infrastructure to be use the keyworded syntax to be more
explicit.

Doing this allows adding a new panicking variant of index projection,
just like the normal index operator. This is useful for cases where
compiler cannot prove (or cannot reliably prove) access is inbounds.

The new syntax looks like this:
- `[try: index]`: Fallible indexing (replaces `[index]?`).
- `[build: index]`: Build-time checked indexing (replaces `[index]`).
- `[panic: index]`: Runtime panicking indexing (newly added).

DMA sample driver and nova-core have been updated.

---
Alexandre Courbot (1):
      gpu: nova-core: use pointer projection for command queue code

Gary Guo (4):
      rust: ptr: add panicking index projection variant
      rust: dma: update to keyworded index projection syntax
      gpu: nova-core: convert to keyworded projection syntax
      rust: ptr: remove implicit index projection syntax

 drivers/gpu/nova-core/gsp/cmdq.rs | 108 +++++++++++++++++++++-----------------
 rust/kernel/dma.rs                |  15 +++---
 rust/kernel/ptr/projection.rs     |  90 +++++++++++++++++++++++++------
 samples/rust/rust_dma.rs          |  12 ++---
 4 files changed, 145 insertions(+), 80 deletions(-)
---
base-commit: 1c7cc4904160c6fc6377564140062d68a3dc93a0
change-id: 20260415-projection-syntax-rework-b790a305bc52

Best regards,
--  
Gary Guo <gary@garyguo.net>