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

オープン 初心者向け
#188 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust

調査の方向性

Cargo.toml の rust-version 設定と src/lib.rs の ctypes 型エイリアスモジュールから始めます。Rust 1.64 の core::ffi 型と既存のターゲット条件を確認してから、既存のテストスイートを実行します。完了とは、MSRV が 1.64 であり、エイリアスが core::ffi に委譲し、サポート対象のターゲットが現在の動作を維持することです。

索引モデルが issue の本文から書いたものです。

説明

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 😅

主要言語
Rust
スター
71
フォーク
63
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sunfishcode/linux-raw-sys のほかの issue

sunfishcode/linux-raw-sys の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。