Libnx ported to the Nim programming language
Find a file
2022-12-09 20:58:14 -07:00
examples Add template for error handling and fix console printing 2018-07-18 11:31:13 +09:00
src/libnx Make results, account, service compile 2022-12-09 20:58:14 -07:00
.gitignore Make results, account, service compile 2022-12-09 20:58:14 -07:00
libnx.nimble Add c2nim generated bindings 2022-12-05 20:06:16 -07:00
LICENSE Initial commit 2018-06-14 16:28:02 +09:00
README.md Update README.md 2019-09-07 08:38:04 -06:00

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!