Raise MSRV to 1.64 and delegate `ctypes` type aliases to `core::ffi`

Aperta Adatta ai principianti
#188 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia con l’impostazione rust-version in Cargo.toml e il modulo degli alias di tipo ctypes in src/lib.rs. Controlla i tipi core::ffi di Rust 1.64 e le condizioni esistenti per i target, quindi esegui la suite di test esistente. Il lavoro è completato quando l’MSRV è 1.64, gli alias delegano a core::ffi e i target supportati mantengono il comportamento attuale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Just sharing this observation despite the benefit likely being minimal. Delegating the C FFI type aliases to those from core::ffi by bumping rust-version to 1.64 seems desirable?

It'd have avoided the need for PRs like this in March 2026 for example (which is merged but still unreleased).


Details

Presently linux-raw-sys supports Rust 1.63 (Aug 2022) as a minimum (in May 2023 rust-version was bumped from 1.48 to benefit from improved const fn support):

https://github.com/sunfishcode/linux-raw-sys/blob/3b15c17f2688445cd3e9ef2907113829837773dd/Cargo.toml#L13

In Nov 2021 linux-raw-sys switched from a cty crate dep to vendoring it's own ctypes type alias module, which presently has required a bit of maintenance support over the past year for Tier 3 targets with ensuring the correct c_char (m68k, hexagon (as a follow-up to restoring support), MIPS R6).

Since Rust 1.64 (Sep 2022) the equivalent FFI C types have been available via the core crate (the target list is managed by a cfg_select! macro, and prior to that the cfg_if! crate macro).

Although this comment says core was not available for a m68k target? (unless they used rustc_codegen_gcc) but as core is already used elsewhere in this crate I assume that wouldn't equate to a regression 😅

Lingua principale
Rust
Stelle
71
Fork
63
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sunfishcode/linux-raw-sys

Tutte le issue di sunfishcode/linux-raw-sys

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.