More actions
Lua.js | |
---|---|
General | |
Author | caHarkness |
Type | Developments |
Version | commit 348913a |
License | Mixed |
Last Updated | 2018/11/06 |
Links | |
Download | |
Website | |
Source | |
A bare-bones implementation of C Lua and Duktape JavaScript interoperability for future projects on the Nintendo Switch via libnx. It requires no extra dependencies aside from a devkitPro environment set up for Switch development.
It demonstrates a good example of code organization, advanced techniques like Lambda "function literals", and the inclusion of open source software, segregated from the main source code.
The project was participated in the GBAtemp Homebrew Bounty 2018.
Features
- Inclusion of fully open-source software's source code (such as Lua and its entirety).
- Project level source code organization (keeping your code separate from Lua).
- C Language level code organization (refactoring your code into separate, relevantly named .c and .h files).
- Interoperability between C Language and scripting langauges (write code in C, Lua, & JavaScript and invoke functions defined in one language from another).
- Working example of a Lambda "function literals" in C (the function is defined during execution).
- Reading whole files from romfs:/ (a demonstration of libnx and importance of convenience functions).
- Concise examples of source and header relationship (reducing clutter, redundancy, and compiler confusion).
- In-depth commenting and code explanation.
Changelog
2018/11/06
- If you have been following along since the first release and found yourself a bit lost, this update is primarily focused on code organization, nomenclature, explanations, and a plethora of new techniques used by more experienced programmers implemented in a smaller scale. This release is the definitive starting point for those looking to familiarize themselves with Nintendo Switch C Language programming with Libnx.