Nx.js
JavaScript runtime for Nintendo Switch homebrew applications
Install / Use
/learn @TooTallNate/Nx.jsREADME
nx.js
<img align="right" width="200" height="200" src="./assets/logo.png">nx.js is a framework that enables the development of Nintendo Switch homebrew applications using JavaScript. Powered by the QuickJS engine, nx.js provides a streamlined environment for writing homebrew applications for the Nintendo Switch console.
With nx.js, developers can leverage their JavaScript skills and tools to create engaging and interactive experiences for the Nintendo Switch platform. The framework abstracts the underlying low-level details and provides a high-level JavaScript API that simplifies the development process.
nx.js is designed with Web standards in mind, so familiar APIs like
setTimeout(), fetch(), new URL(), Canvas and much more are supported. If
you are familar with web development then you should feel right at home.
Features
- JavaScript Development: Write homebrew applications for the Nintendo Switch using JavaScript, a popular and widely supported programming language.
- High-Level API: Benefit from a high-level JavaScript API designed specifically for the Nintendo Switch platform, providing easy access to console-specific features and functionality.
- Input Handling: Capture and process user input with ease, including buttons, touch screen, and motion controls, to create engaging gameplay experiences.
- Graphics and UI: Create visually appealing and interactive user interfaces
using the web
CanvasAPI. - Audio Support: Integrate audio playback and sound effects into your
applications using the web
AudioAPI. - WebAssembly: Support for executing code compiled to WebAssembly (WASM).
Getting Started
Please see the Getting Started guide.
Contributing
Contributions to nx.js are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request in the GitHub repository.
Building from Source
- Node.js needs to be installed
(
curl -sfLS install-node.vercel.app/20 | bash) pnpmneeds to be installed (npm i -g pnpm)jqneeds to be installed (brew install jq)- The devkitPro compiler toolchain needs to be installed
- Install required packages from the official registry:
sudo dkp-pacman -S switch-dev switch-freetype switch-libjpeg-turbo switch-libpng switch-harfbuzz switch-libwebp switch-libzstd switch-mbedtls - Install additional packages which are not in the official registry (cairo,
pixman, wasm3, harfbuzz, quickjs-ng):
docker pull ghcr.io/tootallnate/pacman-packages:nxjs docker run -it --rm --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/host ghcr.io/tootallnate/pacman-packages:nxjs sh -c 'cp packages/*/*.pkg.tar.zst /host' sudo dkp-pacman -U *.pkg.tar.zst qjscneeds to be installed (note: must match the version of the QuickJS dkp package installed in the previous step, see here)- Now you can compile one of the example apps into a self-contained
.nro:./build.sh hello-world
License
nx.js is released under the MIT License. Please see the LICENSE
file for more details.
Related Skills
node-connect
336.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
336.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.0kCommit, push, and open a PR
