dyne / Zenroom

Embedded no-code VM executing human-like language to manipulate data and process cryptographic operations.
https://dev.zenroom.org
GNU Affero General Public License v3.0
186 stars 61 forks source link

Separate zenroom_init from zencode_init on context creation #895

Open jaromil opened 6 days ago

jaromil commented 6 days ago

Following analysis on #892 that mandates init also on argument validation, it makes sense to separate the two kinds of init: the zencode specific one (zen_init_lua in lua_modules.c) can be called afterwards when all input data is validated, this may permit faster start in some circumstances.

jaromil commented 6 days ago

Also quoting @matteo-cristino :

There are still some _err() calls that does not follow the logfmt specified in the conf, but these can not be directly substituted with zerror() since are zenroom or lua initialization error. Another solution should be found for these cases to report errors with the right format.