UNPKG

solijs

Version:

Tool that can link shared object (.so) files to your JavaScript project and expose symbols dynamically.

10 lines (7 loc) 243 B
const sljs = require('../build/Release/sljs'); // Set stdout logger if necessary sljs.setStdoutLogger((msg) => { process.stdout.write(msg); }); // Run the function from the shared object file sljs.runText('./prompt.so', 'hello_prompt');