LuCI - OpenWrt Configuration Interface
Find a file
Jo-Philipp Wich 70ff5c3c4a contrib: introduce ucode-mod-lua
The ucode-mod-lua library provides an ucode-to-Lua bridge and a set of
functions to instantiate Lua VMs, invoke Lua functions as well as
exchanging data structures between ucode and Lua.

Example usage:

    #!/usr/bin/ucode

    'use strict';

    const lua = require("lua");

    let vm = lua.create();

    vm.set({
    	hello: function(...args) {
    		print(`A ucode "Hello world" function called from Lua! Got arguments: ${args}\n`);
    	},

    	data_from_ucode: {
    		bool: true,
    		float: 1.3,
    		int: 0x11223344,
    		string: "Hello from ucode!",
    		array: [ 1, 2, 3, null, 5 ],
    		object: {
    			apple: "green",
    			banana: "yellow",
    			[5]: "foo",
    			[-1]: null,
    			nested: {
    				a: [ 5, 6 ],
    				b: { c: NaN }
    			}
    		},
    		regexp: /foo/
    	}
    });

    vm.invoke("hello", true, 123, "Foo");
    vm.eval('print("Print from Lua!", data_from_ucode.int * data_from_ucode.float);');

    try {
    	vm.invoke("error", "Throwing a Lua exception...");
    }
    catch (e) {
    	print(`Caught exception: ${e}\n`);
    }

    print(`Lua VM version is: ${vm.get('_G', '_VERSION').value()}\n`);

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-30 14:25:33 +02:00
.github Merge pull request #5567 from TDT-AG/pr/20211202-github-issue-templates 2022-01-13 10:34:10 +01:00
applications Merge pull request #5811 from PtilopsisLeucotis/luci-app-mosquitto 2022-05-16 10:04:53 +02:00
build build: i18n-sync.sh: fix i18n-update.pl invocation 2021-07-22 16:32:35 +02:00
collections luci-lib-docker: add container export support 2021-06-15 22:29:24 +08:00
contrib/package contrib: introduce ucode-mod-lua 2022-05-30 14:25:33 +02:00
docs CI: automatically update jsapi docs 2021-10-08 17:16:04 -10:00
libs luci-lib-jsonc: stringify int use json_object_new_int64 instead 2022-03-20 08:11:33 -07:00
modules luci-base: ui.js: add required CSS class to dynlist widget 2022-05-17 21:48:01 +02:00
protocols Merge pull request #5698 from onemarcfifty/luci-ptoto-batadv 2022-04-16 13:37:40 +02:00
themes luci-theme-bootstrap: various style tweaks 2022-05-17 15:09:25 +02:00
.gitignore CI: automatically update jsapi docs 2021-10-08 17:16:04 -10:00
CONTRIBUTING.md CONTRIBUTING.md: Fix sign_your_work link. 2020-03-01 14:33:20 -08:00
jsdoc.conf.json docs: various updates 2019-11-07 12:39:24 +01:00
LICENSE * new project: ff-luci - Freifunk Lua Configuration Interface 2008-03-02 21:52:58 +00:00
luci.mk build: introduce official way to opt out of source minification 2022-04-06 11:42:15 +02:00
NOTICE Update my email addresses in the license headers 2015-01-16 23:49:44 +01:00
package.json CI: automatically update jsapi docs 2021-10-08 17:16:04 -10:00
README.md docs: various updates 2019-11-07 12:39:24 +01:00

OpenWrt luci feed

Translation status

Description

This is the OpenWrt "luci"-feed containing LuCI - OpenWrt Configuration Interface.

Usage

This feed is enabled by default. Your feeds.conf.default (or feeds.conf) should contain a line like:

src-git luci https://github.com/openwrt/luci.git

To install all its package definitions, run:

./scripts/feeds update luci
./scripts/feeds install -a -p luci

API Reference

You can browse the generated API documentation directly on Github.

Development

Documentation for developing and extending LuCI can be found in the Wiki

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.

Translation status

Translation status