diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-08-29 17:09:22 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-10-25 01:03:37 +0200 |
commit | ded8ccf93ec5163be35c41501869110e5dab30d1 (patch) | |
tree | 7802274633e7936d9cb6f7a5ce7914a748bd0913 /modules/luci-base/ucode/sys.uc | |
parent | f2133059e1d6695e6a1b572ae6aded9d7dd3db35 (diff) |
luci-base-ucode: add initial ucode based LuCI runtime
This commits introduces an initial ucode based LuCI runtime. It supports
JSON menu files as used by Lua based LuCI and the template, call, view and
alias dispatch targets.
It is able to render a basic LuCI installation without errors. An embedded
Lua VM is lazily loaded when Lua based resources are encountered, such as
`*.htm` templates or server side Lua call targets.
When a template is requested, the ucode runtime first tries to render an
`/usr/share/ucode/luci/template/${path}.uc` ucode template and falls back
to rendering the corresponding `/usr/lib/lua/luci/view/${path}.htm` Lua
template in case no suitable ucode replacement is found. This allows for
gradual migration of existing Lua based tmeplates to ucode.
Furthermore, a set of stripped down LuCI libraries is shipped in the
`/usr/lib/lua/luci/ucodebridge/` directory. Those libraries provide
compatibility shims for the current Lua API towards Lua templates and Lua
based server side actions while utilizing the ucode request runtime state
internally.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/ucode/sys.uc')
0 files changed, 0 insertions, 0 deletions