Skip to content

Commit ee750d1

Browse files
Fix os.release() segfault
1 parent 3039b20 commit ee750d1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Cargo.lock

+6-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ webpki = "0.22.4"
3737
async-trait = "0.1.77"
3838
url = "2.5.0"
3939
zstd = { version = "0.13.0", default-features = false, features = [] }
40-
uname-rs = "0.1.1"
4140
libc = "0.2.153"
4241
base64-simd = "0.8.0"
4342
hex-simd = "0.8.0"
@@ -68,6 +67,7 @@ tokio-rustls = { version = "0.25.0", features = [
6867
], default-features = false }
6968
ring = "0.17.7"
7069
snmalloc-rs = "0.3.4"
70+
uname = "0.1.1"
7171

7272
[build-dependencies]
7373
rquickjs = { version = "0.4.3", features = [

src/os.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ use rquickjs::{
66
prelude::Func,
77
Ctx, Result,
88
};
9-
use uname_rs::Uname;
109

1110
use crate::{module::export_default, process::get_platform};
1211

1312
static OS_INFO: Lazy<(String, String)> = Lazy::new(|| {
14-
if let Ok(uts) = Uname::new() {
13+
if let Ok(uts) = uname::uname() {
1514
return (uts.sysname, uts.release);
1615
}
1716
(String::from("n/a"), String::from("n/a"))

0 commit comments

Comments
 (0)