Getting started

Lua support in Yue is currently experimental, there are two modes provided:

They can be downloaded in the Releases page, the standalone runtime is in the yue_VERSION_PLATFORM_ARCH.zip archive, the loadable module is in the lua_yue_LUA-VERSION_VERSION_PLATFORM_ARCH.zip archive.

There are plans on making Yue available in LuaRocks.

Using Yue

Currently only the GUI part of Yue has been provided with Lua bindings, which can be loaded via require('yue.gui').

local gui = require('yue.gui')

-- Create window and show it.
local win = gui.Window.create{}
win.onclose = function() gui.lifetime:quit() end
win:setcontentview(gui.Label.create('Content View'))
win:setcontentsize{width=400, height=400}
win:center()
win:activate()

-- Enter message loop.
gui.lifetime:run()