extendr / extendr/libR-sys

Use `unsafe extern` block for Rust 2024

Open
#256 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
56
Forks
26
PR merge metrics
No merged PRs in 30d

Description

This is a bit too early to worry about, but it seems Rust 2024 is going to require an explicit `unsafe` on every `extern` block.

https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-extern.html

However, `unsafe extern` is a very new syntax, which will be available only after Rust 1.82. So, it would be a headache to support both the 2021 edition and the 2024 edition (I'll probably use `rustversion` to switch the implementations).

You can follow the discussion on bindgen's side here:

https://github.com/rust-lang/rust-bindgen/issues/2901

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.