Commit graph

2 commits

Author SHA1 Message Date
Jo-Philipp Wich
ae5afea283 ucode: parse ucode plugin scripts in raw mode, init search path
It makes little sense to execute rpcd ucode plugin scripts in template
mode since those scripts are supposed to output structured JSON data,
so change the parse config to compile scripts in raw mode.

Also initialize the default library search path which is required in
recent ucode versions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-08-12 21:14:27 +02:00
Jo-Philipp Wich
4c532bfed2 ucode: add ucode interpreter plugin
The rpcd ucode plugin allows utilizing ucode scripts to register ubus
objects and to implement the objects method callbacks.

Upon startup, rpcd will compile and execute each ucode script in
`$INSTALL_PREFIX/share/ucode/` and register ubus proxy objects and
methods definitions according to the signature returned by the script.

Refer to examples/ucode/example-plugin.uc for details of the signature
format.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-12-08 20:09:24 +01:00