12 breaking releases

new 0.13.0 Mar 21, 2025
0.11.0 Mar 5, 2025

#265 in Unix APIs

Download history 202/week @ 2025-01-10 682/week @ 2025-01-17 529/week @ 2025-01-24 877/week @ 2025-01-31 602/week @ 2025-02-07 846/week @ 2025-02-14 1600/week @ 2025-02-21 1315/week @ 2025-02-28 1200/week @ 2025-03-07 992/week @ 2025-03-14

5,325 downloads per month
Used in 12 crates (2 directly)

MIT license

340KB
10K SLoC

Rust 8K SLoC // 0.0% comments TypeScript 1.5K SLoC // 0.0% comments JavaScript 192 SLoC // 0.1% comments

deno_os

This crate implements OS specific APIs for Deno

loadavg

Target family Syscall Description
Linux sysinfo -
Windows - Returns DEFAULT_LOADAVG. There is no concept of loadavg on Windows
macOS, BSD getloadavg https://www.freebsd.org/cgi/man.cgi?query=getloadavg

os_release

Target family Syscall Description
Linux /proc/sys/kernel/osrelease -
Windows RtlGetVersion dwMajorVersion . dwMinorVersion . dwBuildNumber
macOS sysctl([CTL_KERN, KERN_OSRELEASE]) -

hostname

Target family Syscall Description
Unix gethostname(sysconf(_SC_HOST_NAME_MAX)) -
Windows GetHostNameW -

mem_info

Target family Syscall Description
Linux sysinfo and /proc/meminfo -
Windows sysinfoapi::GlobalMemoryStatusEx -
macOS
 sysctl([CTL_HW, HW_MEMSIZE]); 
sysctl([CTL_VM, VM_SWAPUSAGE]);
host_statistics64(mach_host_self(), HOST_VM_INFO64)
-

cpu_usage

Target family Syscall Description
Linux getrusage -
Windows processthreadsapi::GetProcessTimes -
macOS getrusage -

Dependencies

~115MB
~2.5M SLoC