Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Lua.js Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=Lua.js |image=luajs.png |description=A C library to include Lua and Javascript sources in your C homebrew project. |author=caHarkness |lastupdated=2018/11/06 |type=Developments |version=commit 348913a |license=Mixed |download=https://dlhb.gamebrew.org/switchhomebrews/luajs-interop-master348913a.zip |website=https://gbatemp.net/threads/homebrew-bounty-2018-month-1-switch-tools-and-utilities.520090/post-8361016 |source=https://github.com/c...")
 
No edit summary
 
Line 16: Line 16:
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.
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.
The project was participated in the GBAtemp Switch Homebrew Bounty 2018 (Tools and Utilities).


== Features ==
== Features ==
Line 37: Line 37:
* GBAtemp - https://gbatemp.net/threads/homebrew-bounty-2018-month-1-switch-tools-and-utilities.520090/post-8361016
* GBAtemp - https://gbatemp.net/threads/homebrew-bounty-2018-month-1-switch-tools-and-utilities.520090/post-8361016
* GBAtemp - https://gbatemp.net/download/lua-js-luajs-interop-on-github.35264/
* GBAtemp - https://gbatemp.net/download/lua-js-luajs-interop-on-github.35264/
[[Category:GBAtemp Homebrew Bounty 2018]]

Latest revision as of 12:46, 4 Haziran 2024

Lua.js
Luajs.png
General
AuthorcaHarkness
TypeDevelopments
Versioncommit 348913a
LicenseMixed
Last Updated2018/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 Switch Homebrew Bounty 2018 (Tools and Utilities).

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.

External links

Advertising: