test-rm 0.1.1

Example test of the module rust-to-npm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env node

const { exec } = require("child_process");
const path = require("path");

const binp = path.join(__dirname, "target", "release", "test-rm");

exec(binp, (error, stdout, stderr) => {
  stdout && console.log(stdout);
  stderr && console.log(stderr);
  if (error !== null) {
    console.log(`exec error: ${error}`);
  }
});