libnx

Nintendo Switch library libnx for Nim.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.2.2
License The Unlicense
CI Status Failing
Downloads 0
Last Indexed 2026-08-30 07:10

Authors

  • Joey Payne

Installation

nimble install libnx
choosenim install libnx
git clone https://github.com/jyapayne/nim-libnx

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
libnx - - - - - - -

Dependencies

Package Version Optional
nim >= 0.18.1", "nimgen#dc9943a22c9c8f6a5a6a92f0055e1de4dfaf87d2 No
switch_build >= 0.1.3 No

Source

Repository https://github.com/jyapayne/nim-libnx
Homepage https://github.com/jyapayne/nim-libnx
Registry Source nimble_official

README

nim-libnx

Libnx ported to the Nim programming language. You will need a Nim compiler with Nintendo switch support which can be found in the latest devel branch of the Nim compiler.

You also must have DevkitPro and switch (libnx) libraries for Mac and Linux or Windows installed.

From dkp-pacman, the switch libraries can be installed with:

dkp-pacman -Syu
dkp-pacman -S switch-dev
## When it asks for installation options, choose the default which will install everything

The DEVKITPRO environment variable must also exist and point to a directory with the following structure:

  • DEVKITPRO/libnx/lib
  • DEVKITPRO/libnx/include

OR you must specify a valid libnx path and/or devkitpro path to the switch_build utility:

switch_build --libnxPath:"C:\devkitPro\libnx" --author:"Joey" --version:"1.0.0" .\examples\accounts\account_ex.nim
# OR
switch_build --devkitProPath:"C:\devkitPro" --author:"Joey" --version:"1.0.0" .\examples\accounts\account_ex.nim

Install

Simply run

# Because of a bug in nimble right now, you must install this first!
nimble install nimgen@#head
nimble install

To compile examples:

nimble buildExamples

PRs are welcome for porting other examples or any other changes!