Skip to content

Commit 3fd0872

Browse files
authored
Enable nopanic check for linux_rustix (#536)
The `linux_rustix` opt-in backend should be panic-free since rustix v0.38.38.
1 parent 83e5337 commit 3fd0872

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/nopanic.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ jobs:
4949
- name: Check (linux_android.rs)
5050
run: (exit $( grep -c panic target/release/libgetrandom_wrapper.so ))
5151

52-
# TODO: re-enable after https://github.com/bytecodealliance/rustix/pull/1184 is released
53-
# - name: Build (linux_rustix.rs)
54-
# env:
55-
# RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
56-
# run: cargo build --release
57-
# - name: Check (linux_rustix.rs)
58-
# run: (exit $( grep -c panic target/release/libgetrandom_wrapper.so ))
52+
- name: Build (linux_rustix.rs)
53+
env:
54+
RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_rustix"
55+
run: cargo build --release
56+
- name: Check (linux_rustix.rs)
57+
run: (exit $( grep -c panic target/release/libgetrandom_wrapper.so ))
5958

6059
- name: Build (rdrand.rs)
6160
env:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ libc = { version = "0.2.154", default-features = false }
2424

2525
# linux_rustix
2626
[target.'cfg(all(any(target_os = "linux", target_os = "android"), any(target_env = "", getrandom_backend = "linux_rustix")))'.dependencies]
27-
rustix = { version = "0.38", default-features = false, features = ["rand"] }
27+
rustix = { version = "0.38.38", default-features = false, features = ["rand"] }
2828

2929
# apple-other
3030
[target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies]

0 commit comments

Comments
 (0)