Clone the repository next to the IoT.js directory.
- The following directory structure should be present now:
$ ls -1
iotjs
shoml
- If the directory structure is ok, then build the iotjs and the module:
$ cd iotjs && tools/build.py --external-modules=../shoml --cmake-param=-DENABLE_MODULE_SHOML=ON --clean
This will also create a libiotjs_dynmodule.so
in the IoT.js lib
build directory.
- After the build run the following example js file which uses the SHOML module. For example:
$ ./build/x86_64-linux/debug/bin/iotjs ../shoml/lib/test_so_load.js