Warning: the 'u' in the repo's name is a 'µ', not a 'u'.
- Download ctruLua.zip from the releases (for something stable) or the CI server (for more features)
- Unzip it on your SD card, in a folder inside your homebrews folder; if you use HBL, extract it in
/3ds/ctrulua/
- Put some scripts wherever you want, just remember where
- Launch CtrµLua from your homebrew launcher
- Use the shell to run your scripts
- Most recent working build: ctruLua.3dsx
- See https://reuh.eu/ctrulua/ci/ctrulua for all the builds.
local ctr = require("ctr")
local gfx = require("ctr.gfx")
local hid = require("ctr.hid")
while ctr.run() do
hid.read()
local keys = hid.keys()
if keys.held.start then break end
gfx.start(gfx.TOP)
gfx.text(2, 2, "Hello, world !")
gfx.stop()
gfx.render()
end
This script will print "Hello, world !" on the top screen, and will exit if the user presses Start. This is the "graphical" version; there's also a text-only version, based on the console:
local ctr = require("ctr")
local gfx = require("ctr.gfx")
local hid = require("ctr.hid")
gfx.console()
print("Hello, world !")
while ctr.run() do
hid.read()
local keys = hid.keys()
if keys.held.start then break end
gfx.render()
end
gfx.disableConsole()
- An online version of the documentation can be found here
- To build the documentation, run
make build-doc-html
(requires LDoc).
- Setup your environment as shown here : http://3dbrew.org/wiki/Setting_up_Development_Environment
- Clone this repository and run the command
make build-all
to build all the dependencies. - If you only made changes to ctrµLua, run
make
to rebuild ctrµLua without rebuilding all the dependencies.
May not work under Windows.