Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immediate panics in Deno and Bun on Windows #705

Open
0xNF opened this issue Feb 24, 2025 · 1 comment
Open

Immediate panics in Deno and Bun on Windows #705

0xNF opened this issue Feb 24, 2025 · 1 comment
Labels

Comments

@0xNF
Copy link

0xNF commented Feb 24, 2025

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)

@0xNF 0xNF added the bug label Feb 24, 2025
@aminya
Copy link
Member

aminya commented Feb 24, 2025

Bun and Deno are not officially supported as of now.
We have to add CI for it and test them to know their state.

For Windows, this is possibly related:

set_property(TARGET addon PROPERTY LINK_FLAGS "-Xlinker /DELAYLOAD:NODE.EXE")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants