Skip to content

Latest commit

History

History
61 lines (45 loc) 路 2.29 KB

File metadata and controls

61 lines (45 loc) 路 2.29 KB

馃 Core utilities

Platform-specific utilities

Each OS has its own set of (from the lowest to the highest level):

Directly executing one of those (e.g. calling sed) won't usually work on every OS.

Cross-platform solutions

Most Node.js API core modules abstract this (mostly through libuv). For example, the child_process methods are executing OS-specific system calls under the hood.

Some projects abstract OS-specific core utilities like:

Other projects provide with cross-platform features like copy/pasting, such as clipboard-cli.

Low-level solutions

Finally, some lower-level tools attempt to bring cross-platform compatibility by emulating or translating system calls:

  • Wine: to run Windows API calls on Linux, Mac, BSD and Solaris.
  • Cygwin: to run POSIX on Windows.
  • WSL: to run the Linux command line on Windows (ELF binary execution, system calls, filesystem, Bash, core utilities, common applications).

Summary

Do not rely on OS system calls or core utilities without using an abstraction layer.


Next (馃 Testing)
Previous (馃 Node setup)
Top