Open
Description
Describe the bug The code below will only run in node.js, and will crash both Deno and Bun.
Reproducing
import * as zmq from "zeromq";
const addr_ipc = "ipc://C:/Users/nf/Desktop/myfilelol";
const addr = addr_ipc;
async function run() {
const sock = new zmq.Reply()
await sock.bind(addr)
console.log('bound to ipc socket');
for await (const [msg] of sock) {
const j = fromBytes(msg);
console.log(j.strField);
await sock.send(j.strField)
}
}
run();
function fromBytes(buffer) {
const s = buffer.toString();
const j = JSON.parse(s);
return j;
}
specs:
Bun
Bun v1.2.3 (8c4d3ff8) Windows x64
Windows v.win11_dt
CPU: sse42 avx avx2 avx512
Deno
deno 2.2.1 (stable, release, x86_64-pc-windows-msvc)
v8 13.4.114.9-rusty
typescript 5.7.3
Node
v18.16.0
Expected behavior Not to crash, and to produce the same output that node does, which is to bind correctly and print incoming messages.
Tested on
Edition Windows 11 Pro
Version 24H2
Installed on 1/8/2025
OS build 26100.2894
Serial number 0F00NUH220700C
Experience Windows Feature Experience Pack 1000.26100.36.0
- OS: Windows 11
- ZeroMQ.js version: 6.3.0
See also, the issues for Deno (denoland/deno#18345) and Bun (oven-sh/bun#17592), and potentially related issues here (#599)