• How to expose a c/c++ module to Espruino JS?

    For example, the jswrap_hello.c defines the 'Hello' class , it has a method 'world()', then we can do in Espruino:

    Hello.world();
    

    How to expose 'Hello' as a module just like 'net' or 'Wifi'? I mean 'Hello' can be required like this:

    var hello = require('Hello');
    hello.world();
    

    or

    require('Hello').world();
    
About

Avatar for Aifer @Aifer started