// Output stdout and stderr to console const originalWriteSync = wasmFs.fs.writeSync; wasmFs.fs.writeSync = (fd, buffer, offset, length, position) => { const text = new TextDecoder("utf-8").decode(buffer); // Filter out standalone "\n" added by every `print`, `console.log` // always adds its own "\n" on top. if (text !== "\n") { switch (fd) { case 1: console.log(text); break; case 2: console.error(text); break; } } return originalWriteSync(fd, buffer, offset, length, position); };
print
って Swift.print
のこと?