I understand that it is new approach for coding in OpenWRT and we need to use it when we can instead of ash scripting? I am just trying to choose architecthure for my project (part is written on ash, frontend is JS) and I need some tool for interaction between frontend and backend. I googled it and google says that ucode is preferable way to interact with rpcd instead of ash scripts.
It means that I need to place my code for interaction with rpcd to /usr/share/rpcd/ucode/mycode.uc instead of /usr/libexec/rpcd/mycode
Other stuff, like acl, and JS-forms stays at old places? I am just very new to this.
No, it is not a replacement for ASH.
From its documentation:
the major design goals of ucode are the ability to trivially read and write JSON data, good embeddability into C applications, template capabilities for output formatting, extensiblity through loadable native extension modules and a straightforward set of built-in functions mimicking those found in the Perl 5 language.
and
History and Motivation
In spring 2021 it has been decided to rewrite the OpenWrt firewall framework on top of nftables with the goal to replace the then current C application with a kind of preprocessor generating nftables rulesets using a set of templates instead of relying on built-in hardcoded rules like its predecessor.
That decision spurred the development of ucode, initially meant to be a simple template processor solely for the OpenWrt nftables firewall but quickly evolving into a general purpose scripting language suitable for a wider range of system scripting tasks.
So you don't have to do any migration to it.
Your choice. But bare in mind it will not be "portable" to other systems.
PS Link to documentation