11cb0ef41Sopenharmony_ci# Supported platforms
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci|  System | Support type | Supported versions | Notes |
41cb0ef41Sopenharmony_ci|---|---|---|---|
51cb0ef41Sopenharmony_ci| GNU/Linux | Tier 1 | Linux >= 2.6.32 with glibc >= 2.12 | |
61cb0ef41Sopenharmony_ci| macOS | Tier 1 | macOS >= 10.15 | Current and previous macOS release |
71cb0ef41Sopenharmony_ci| Windows | Tier 1 | >= Windows 8 | VS 2015 and later are supported |
81cb0ef41Sopenharmony_ci| FreeBSD | Tier 1 | >= 10 | |
91cb0ef41Sopenharmony_ci| AIX | Tier 2 | >= 6 | Maintainers: @libuv/aix |
101cb0ef41Sopenharmony_ci| IBM i | Tier 2 | >= IBM i 7.2 | Maintainers: @libuv/ibmi |
111cb0ef41Sopenharmony_ci| z/OS | Tier 2 | >= V2R2 | Maintainers: @libuv/zos |
121cb0ef41Sopenharmony_ci| Linux with musl | Tier 2 | musl >= 1.0 | |
131cb0ef41Sopenharmony_ci| Android | Tier 3 | NDK >= r15b | Android 7.0, `-DANDROID_PLATFORM=android-24` |
141cb0ef41Sopenharmony_ci| MinGW | Tier 3 | MinGW32 and MinGW-w64 | |
151cb0ef41Sopenharmony_ci| SunOS | Tier 3 | Solaris 121 and later | |
161cb0ef41Sopenharmony_ci| Other | Tier 3 | N/A | |
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ci## Support types
191cb0ef41Sopenharmony_ci
201cb0ef41Sopenharmony_ci* **Tier 1**: Officially supported and tested with CI. Any contributed patch
211cb0ef41Sopenharmony_ci  MUST NOT break such systems. These are supported by @libuv/collaborators.
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_ci* **Tier 2**: Officially supported, but not necessarily tested with CI. These
241cb0ef41Sopenharmony_ci  systems are maintained to the best of @libuv/collaborators ability,
251cb0ef41Sopenharmony_ci  without being a top priority.
261cb0ef41Sopenharmony_ci
271cb0ef41Sopenharmony_ci* **Tier 3**: Community maintained. These systems may inadvertently break and the
281cb0ef41Sopenharmony_ci  community and interested parties are expected to help with the maintenance.
291cb0ef41Sopenharmony_ci
301cb0ef41Sopenharmony_ci## Adding support for a new platform
311cb0ef41Sopenharmony_ci
321cb0ef41Sopenharmony_ci**IMPORTANT**: Before attempting to add support for a new platform please open
331cb0ef41Sopenharmony_cian issue about it for discussion.
341cb0ef41Sopenharmony_ci
351cb0ef41Sopenharmony_ci### Unix
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ciI/O handling is abstracted by an internal `uv__io_t` handle. The new platform
381cb0ef41Sopenharmony_ciwill need to implement some of the functions, the prototypes are in
391cb0ef41Sopenharmony_ci``src/unix/internal.h``.
401cb0ef41Sopenharmony_ci
411cb0ef41Sopenharmony_ciIf the new platform requires extra fields for any handle structure, create a
421cb0ef41Sopenharmony_cinew include file in ``include/`` with the name ``uv-theplatform.h`` and add
431cb0ef41Sopenharmony_cithe appropriate defines there.
441cb0ef41Sopenharmony_ci
451cb0ef41Sopenharmony_ciAll functionality related to the new platform must be implemented in its own
461cb0ef41Sopenharmony_cifile inside ``src/unix/`` unless it's already done in a common file, in which
471cb0ef41Sopenharmony_cicase adding an `ifdef` is fine.
481cb0ef41Sopenharmony_ci
491cb0ef41Sopenharmony_ciTwo build systems are supported: autotools and cmake. Ideally both need to be
501cb0ef41Sopenharmony_cisupported, but if one of the two does not support the new platform it can be
511cb0ef41Sopenharmony_cileft out.
521cb0ef41Sopenharmony_ci
531cb0ef41Sopenharmony_ci### Windows
541cb0ef41Sopenharmony_ci
551cb0ef41Sopenharmony_ciWindows is treated as a single platform, so adding support for a new platform
561cb0ef41Sopenharmony_ciwould mean adding support for a new version.
571cb0ef41Sopenharmony_ci
581cb0ef41Sopenharmony_ciCompilation and runtime must succeed for the minimum supported version. If a
591cb0ef41Sopenharmony_cinew API is to be used, it must be done optionally, only in supported versions.
601cb0ef41Sopenharmony_ci
611cb0ef41Sopenharmony_ci### Common
621cb0ef41Sopenharmony_ci
631cb0ef41Sopenharmony_ciSome common notes when adding support for new platforms:
641cb0ef41Sopenharmony_ci
651cb0ef41Sopenharmony_ci* Generally libuv tries to avoid compile time checks. Do not add any to the
661cb0ef41Sopenharmony_ci  autotools based build system or use version checking macros.
671cb0ef41Sopenharmony_ci  Dynamically load functions and symbols if they are not supported by the
681cb0ef41Sopenharmony_ci  minimum supported version.
69