Skip to content

Commit

Permalink
error: extern block cannot be declared unsafe
Browse files Browse the repository at this point in the history
issue:
rust-lang/rust-bindgen#3015
rust-lang/rust-bindgen#2901

error[E0433]: failed to resolve: could not find `offset_of` in mem
issue:
rust-lang/rust-bindgen#2960

Use unsafe extern instead of extern in blocks for any Rust target after 1.82
  • Loading branch information
admin committed Jan 14, 2025
1 parent 17865ac commit bf49ab7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ jobs:
echo "PKG_CONFIG_PATH=$PWD/ffmpeg-libs/lib/amd64/pkgconfig" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$PWD/ffmpeg-libs" >> "$GITHUB_ENV"
# rust-version from Cargo.toml
- name: Install Rust 1.70.0
uses: dtolnay/rust-toolchain@1.70.0
- name: Install Rust 1.82.0
uses: dtolnay/rust-toolchain@1.82.0
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v2-rust"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = ["multimedia"]
include = ["LICENSE", "build.rs", "src/"]

# When changing MSRV: Also update build.yml and README.md
rust-version = "1.70.0"
rust-version = "1.82.0"

[dependencies]
libc = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you have significant, demonstrable experience in Rust and multimedia-related

## Minimum supported Rust version (MSRV)

Both `ffmpeg-the-third` and `ffmpeg-sys-the-third` currently require a Rust version of 1.70.0 or higher. Increases in MSRV will result in a semver MINOR version increase.
Both `ffmpeg-the-third` and `ffmpeg-sys-the-third` currently require a Rust version of 1.82.0 or higher. Increases in MSRV will result in a semver MINOR version increase.

If you are having issues compiling this crate on your version of Rust, there are two tools you can use to help find MSRV-compatible dependency versions:

Expand Down
2 changes: 1 addition & 1 deletion ffmpeg-sys-third/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keywords = ["audio", "video"]
categories = ["multimedia", "external-ffi-bindings"]

# When changing MSRV: Also update build.yml and README.md
rust-version = "1.70.0"
rust-version = "1.82.0"

[lib]
# Disable doctests as a workaround for https://github.com/rust-lang/rust-bindgen/issues/1313
Expand Down

0 comments on commit bf49ab7

Please sign in to comment.