Library:libnx
Appearance
| On this wiki | Facts · Code · Notes · Topics |
|---|
The ISC-licensed standard library for Nintendo Switch homebrew (switchbrew): svc wrappers, IPC service clients, crt0 with the NRO/NSO MOD0 and homebrew ABI loader environment. Its headers document services and public structures.
Overview
libnx (nx/include/switch/): nro.h (NRO header, segments, asset header), nacp.h (NacpStruct), runtime/env.h (the homebrew loader environment passed in x0: config entries such as main thread handle, argv, heap override, applet type), services/*.h, kernel/svc.h. nx/source/runtime/switch_crt0.s shows the NRO entry (x0=env ptr, x1=0xFFFFFFFFFFFFFFFF) vs NSO entry (x0=0) and user-mode exception entry convention; dynamic.c defines the MOD0 header.
See Platform:Nintendo Switch, Format:NRO, Format:NACP.
Code & repositories
- https://github.com/switchbrew/libnx @
20cbcfd90567f7bf84df7725f27e345e2164fa6b· license: ISC
libnx: nx/include/switch/nro.h (NRO), nacp.h (NACP), nx/source/runtime/dynamic.c (MOD0), switch_crt0.s (entry convention).
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2026-10-14