Important
Since the newer versions of lune allows their standard libraries to be used individually as cargo crates, forking lune is no longer necessary So we have deperecated this forked repo in favor of LuneWeb-template
LuneWeb's goal is to provide users with an api for creating web applications and having full control over them.
We do not provide any kind of framework for creating UI in Luau, it is up to the developers to create bindings for such things, for example:
-- ! This code is not tested.
local serde = require("@luneweb/serde")
local id = 0
local function title(value: string)
local value_js = serde.encode("json", value)
local script = {
`let el{id} = document.createElement("h1")`,
`el{id}.innerHTML = {value_js}`,
`document.body.appendChild(el{id})`
}
id += 1
return table.concat(script, ";")
end
-- ... after creating a window with a webview
webview:evaluate_noresult(title("Hello, World!"))
Documentation for all the built-in libraries that already exist in Lune will be here: Lune's Documentation
Documentation for built-in libraries that are only in this repository will be here: LuneWeb's Documentation
use aftman add HighFlowey/luneweb@<version> --global
to install luneweb globally on your system (replace <version> with a valid version, like 0.1.4)
Download the executable from Releases, and add it to PATH
git clone
this repo and use cargo build --release
to build an executable, the executable can be found in ./target/release/, now you cann add the executable to PATH
Here is the underlying web engine each platform uses, and some dependencies you might need to install.
Before 0.1.6, there is no support for Linux.
LuneWeb needs WebKitGTK for WebView. So please make sure the following packages are installed:
sudo pacman -S webkit2gtk-4.1
Debian / Ubuntu:
sudo apt install libwebkit2gtk-4.1-dev
Fedora:
sudo dnf install gtk3-devel webkit2gtk4.1-devel
macOS is not tested.
WebKit is native on macOS so everything should be fine.
WebView2 provided by Microsoft Edge Chromium is used. So wry supports Windows 7, 8, 10 and 11.