D3.6/views/integration.md

35 lines
2.2 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:
```
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.
- Go language bindings https://github.com/DECODEproject/zenroom-go
- Python language bindings https://github.com/DECODEproject/zenroom-py
- Java (JNI) and SWIG (universal) language bindings are inside Zenroom's source repository https://github.com/DECODEproject/zenroom
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) see https://www.npmjs.com/package/zenroom
Even considering the delay some pilots are presenting especially in having ready the cryptographic contracts that need to be translated to Zenroom and then wrapped into Zencode, it is evident that the way we engineered the Zenroom VM and the Zencode DSL will make it easy to integrate it everywhere without additional work. The main critical concern we hold at this stage of development is the readiness of the cryptographic contracts in which we expect partners to get involved, to push forward the piloting stage.