D3.6/views/integration.md

29 lines
1.4 KiB
Markdown

# Integration
The integration of Zencode is so far relying on the same integration schemes present for Zenroom, with the addition of a minimal layer of boilerplate code for its execution. This is so to facilitate flexibility in piloting, but will be later changed to lock down to the sole execution of Zencode via new specific API calls.
Therefore, for now, in addition to the C call that we have exported to Java, Go, Python and Javascript languages along with utility wrappers:
```c
int zenroom_exec(char *script, char *conf, char *keys,
char *data, int verbosity);
```
We also have the boilerplate internal to the `script` buffer:
```lua
verbosity_level = 1
ZEN:begin(verbosity_level)
ZEN:parse([[
-- your zencode here
]])
ZEN:run()
```
The execution of actual Zencode lines happens sequentially at the time of the `ZEN:run()` call. Each line as part of the whole statement block (utterance) makes use of data types which may or may be validated and should be present in the KEYS and DATA buffers.
A list of Zenroom/Zencode integrated implementations follow: they have been developed in relation to each pilot software implementation as needed, covering several languages. Also notable the presence of the `zenroom` module inside the NodeJS Package Manager collection (NPM) and of course its extremely portable WebAssembly optimized build (universal binary).
TODO: list git repos