17 breaking releases

new 0.18.0 Apr 14, 2025
0.16.0 Apr 5, 2025
0.14.0 Mar 28, 2025

#820 in Network programming

Download history 543/week @ 2025-01-13 487/week @ 2025-01-20 872/week @ 2025-01-27 543/week @ 2025-02-03 717/week @ 2025-02-10 1132/week @ 2025-02-17 1484/week @ 2025-02-24 1199/week @ 2025-03-03 1292/week @ 2025-03-10 1340/week @ 2025-03-17 819/week @ 2025-03-24 1246/week @ 2025-03-31 1191/week @ 2025-04-07

4,657 downloads per month
Used in 12 crates (2 directly)

MIT license

345KB
10K SLoC

Rust 9K 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

~116MB
~2.5M SLoC