VlkrS
60d3c4c1ec
feat(runtime): sys_info.rs - Use KERN_OSRELEASE on {Free,Open}BSD ( #19849 )
...
os_release() can use the same API as apple on FreeBSD and OpenBSD. Ports
for both systems contain a patch to that effect.
See:
https://github.com/freebsd/freebsd-ports/blob/main/www/deno/files/patch-runtime_ops_os_sys__info.rs
https://cvsweb.openbsd.org/ports/lang/deno/patches/patch-runtime_ops_os_sys_info_rs?rev=1.2
2023-07-22 05:50:57 +02:00
Matt Mastracci
8465bd0037
chore: update to Rust 1.71 ( #19822 )
2023-07-13 15:16:24 -06:00
Martin Fischer
801b9ec62d
chore: fix typos ( #19572 )
2023-06-26 09:10:27 -04:00
David Sherret
28aa489de9
feat(compile): unstable npm and node specifier support ( #19005 )
...
This is the initial support for npm and node specifiers in `deno
compile`. The npm packages are included in the binary and read from it via
a virtual file system. This also supports the `--node-modules-dir` flag,
dependencies specified in a package.json, and npm binary commands (ex.
`deno compile --unstable npm:cowsay`)
Closes #16632
2023-05-10 20:06:59 -04:00
Divy Srivastava
a4c98e3472
fix(runtime/os): use GetPerformanceInfo for swap info on Windows ( #17433 )
...
Fixes https://github.com/denoland/deno/issues/17417
According to
https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex
, `stat.ullTotalPageFile` value is reliable only from
GetPerformanceInfo()
Also see https://github.com/GuillaumeGomez/sysinfo/issues/534
Co-authored-by: Nightly <dhairysrivastava5@gmail.com>
2023-01-15 12:56:30 +00:00
Geert-Jan Zwiers
deed07e1d9
chore: resolve clippy errors in windows build ( #17215 )
2023-01-03 15:04:02 -05:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 ( #17247 )
...
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Kamil Ogórek
65ea554afe
fix(node): Add op_node_unstable_os_uptime to allow for node interop ( #17208 )
2022-12-28 14:56:05 +01:00
Kamil Ogórek
7ce2b58bcf
feat(unstable): Add "Deno.osUptime()" API ( #17179 )
...
This PR adds support for `Deno.osUptime` which reports number of seconds
since os was booted. It will allow us to be compatible with Node's `os.uptime` -
https://nodejs.org/api/os.html#osuptime
Partially based on
https://docs.rs/uptime_lib/latest/src/uptime_lib/lib.rs.html
2022-12-27 00:16:12 +01:00
David Sherret
ed521850af
chore: fix windows-only clippy error ( #16560 )
2022-11-07 21:40:20 -05:00
Yoshiya Hinosawa
6fe9428805
fix(runtime): fix Deno.hostname on windows ( #16530 )
2022-11-04 04:00:53 +09:00
Bartek Iwańczuk
68da943498
chore: fix clippy warning ( #16512 )
2022-11-02 15:40:11 +01:00
Divy Srivastava
ab7e80bde4
chore(runtime): remove dependency on sys-info crate ( #16441 )
...
Fixes #9862
`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`](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-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 | - |
| Windows | `sysinfoapi::GlobalMemoryStatusEx` | - |
| macOS | <br> <pre> sysctl([CTL_HW, HW_MEMSIZE]); <br> sysctl([CTL_VM,
VM_SWAPUSAGE]); <br> host_statistics64(mach_host_self(), HOST_VM_INFO64)
</pre> | - |
2022-11-02 12:47:00 +05:30