What was wrong on MacOS?
Wasn't it working with code similar to:
```
let input;
worker.once("start", function () {
  let contents = {
    is_daemon: 0,
    server_port: port,
    is_lib_call: 1
  };
  contents.spawnIO = ...;
  ...
  input = struct_adb_main_input(contents);
  main(input.address());
});
worker.once("cleanup", function () {
  // Ensure keeping a reference to input to avoid it from being garbaged at anytime
  // but do not forget to free it here:
  input = null;
});
```