You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Node.js v12 (requires a [N-API](https://nodejs.org/api/n-api.html))
71
-
72
-
### Prebuilt binaries
73
-
74
-
The following platforms have a **prebuilt binary** available:
75
-
76
-
- Windows on x86/x86-64
77
-
78
-
Zeromq binaries on Windows 10 or older need
79
-
[Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version)
80
-
to be installed.
81
-
82
-
- Linux on x86-64 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:
83
-
- Debian 9+ (Stretch or later)
84
-
- Ubuntu 16.04+ (Xenial or later)
85
-
- CentOS 8+
86
-
- Linux on x86-64 with musl, for example:
87
-
- Alpine 3.3+
88
-
- MacOS 10.9+ on x86-64
89
-
90
-
If a prebuilt binary is not available for your platform, installing will attempt
91
-
to start a build from source.
92
-
93
-
### Building from source
94
-
95
-
If a prebuilt binary is unavailable, or if you want to pass certain options
96
-
during build, you can build this package from source.
97
-
98
-
Make sure you have the following installed before attempting to build from
99
-
source:
100
-
101
-
- Node.js 10+ or Electron
102
-
- C++17 compiler toolchain (e.g. LLVM, GCC, MSVC)
103
-
- Python 3
104
-
- CMake 3.16+
105
-
- vcpkg dependencies (e.g. on Linux it needs curl, unzip, zip, tar, git,
106
-
pkg-config)
107
-
108
-
For Curve:
109
-
110
-
- automake
111
-
- autoconf
112
-
- libtool
113
-
114
-
To install from source, specify `build_from_source=true` in a `.npmrc` file
115
-
116
-
```
117
-
build_from_source=true
118
-
```
119
-
120
-
When building from source, you can also specify additional build options in a
121
-
`.npmrc` file in your project:
122
-
123
-
### Available Build Options
124
-
125
-
<details>
126
-
<summary>👉🏻 Options</summary>
127
-
128
-
### Curve with Libsodium support
129
-
130
-
(Enabled by default)
131
-
132
-
Enables CURVE security for encrypted communications. Zeromq uses libsodium for
133
-
CURVE security. To enable CURVE support, add the following to your .npmrc:
134
-
135
-
```ini
136
-
zmq_curve="true"
137
-
zmq_sodium="true"
138
-
```
139
-
140
-
Building libsodium requires these dependencies on Linux/MacOS:
141
-
`autoconf automake libtool`, which can be installed via `apt-get` or `brew`,
142
-
etc.
143
-
144
-
#### Draft support
145
-
146
-
(Enabled by default)
147
-
148
-
By default `libzmq` is built with support for `Draft` patterns (e.g.
149
-
`server-client`, `radio-dish`, `scatter-gather`). If you want to build `libzmq`
150
-
without support for `Draft`, you can specify the following in `.npmrc`:
151
-
152
-
```ini
153
-
zmq_draft=false
154
-
```
155
-
156
-
#### Websocket support
157
-
158
-
Enables WebSocket transport, allowing ZeroMQ to communicate over WebSockets. To
159
-
enable WebSocket support, add the following to your .npmrc:
160
-
161
-
```ini
162
-
zmq_websockets="true"
163
-
```
164
-
165
-
#### Secure Websocket support
166
-
167
-
Enables WebSocket transport with TLS (wss), providing secure WebSocket
168
-
communications. To enable secure WebSocket support, add the following to your
169
-
.npmrc:
170
-
171
-
```ini
172
-
zmq_websockets_secure="true"
173
-
```
174
-
175
-
#### Not Synchronous Resolve
176
-
177
-
Enables immediate send/receive on the socket without synchronous resolution.
178
-
This option can improve performance in certain scenarios by allowing operations
179
-
to proceed without waiting for synchronous resolution. To enable this feature,
180
-
add the following to your `.npmrc`:
181
-
182
-
```ini
183
-
zmq_no_sync_resolve="true"
184
-
```
185
-
186
-
#### MacOS Deployment Target
187
-
188
-
Specifies the minimum macOS version that the binary will be compatible with.
189
-
This is particularly useful when building for different macOS versions. To set
190
-
this, add the following to your .npmrc, replacing 10.15 with your desired
191
-
minimum macOS version:
192
-
193
-
```ini
194
-
macosx_deployment_target="10.15"
195
-
```
196
-
197
-
</details>
70
+
- Node.js v10+ (requires a [N-API](https://nodejs.org/api/n-api.html))
198
71
199
72
## Examples
200
73
201
74
Here some examples of different features are provided. More examples can be
[the API reference documentation](http://zeromq.github.io/zeromq.js/globals.html)
@@ -423,6 +297,133 @@ _Requirements_
423
297
include their corresponding polyfills if needed): `es2015`,
424
298
`ESNext.AsyncIterable`
425
299
300
+
### Prebuilt binaries
301
+
302
+
The following platforms have a **prebuilt binary** available:
303
+
304
+
- Windows on x86/x86-64
305
+
306
+
Zeromq binaries on Windows 10 or older need
307
+
[Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version)
308
+
to be installed.
309
+
310
+
- Linux on x86-64 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:
311
+
- Debian 9+ (Stretch or later)
312
+
- Ubuntu 16.04+ (Xenial or later)
313
+
- CentOS 8+
314
+
- Linux on x86-64 with musl, for example:
315
+
- Alpine 3.3+
316
+
- MacOS 10.9+ on x86-64
317
+
318
+
If a prebuilt binary is not available for your platform, installing will attempt
319
+
to start a build from source.
320
+
321
+
### Building from source
322
+
323
+
If a prebuilt binary is unavailable, or if you want to pass certain options
324
+
during build, you can build this package from source.
325
+
326
+
Make sure you have the following installed before attempting to build from
327
+
source:
328
+
329
+
- Node.js 10+ or Electron
330
+
- C++17 compiler toolchain (e.g. LLVM, GCC, MSVC)
331
+
- Python 3
332
+
- CMake 3.16+
333
+
- vcpkg dependencies (e.g. on Linux it needs curl, unzip, zip, tar, git,
334
+
pkg-config)
335
+
336
+
For Curve:
337
+
338
+
- automake
339
+
- autoconf
340
+
- libtool
341
+
342
+
To install from source, specify `build_from_source=true` in a `.npmrc` file
343
+
344
+
```ini
345
+
build_from_source=true
346
+
```
347
+
348
+
When building from source, you can also specify additional build options in a
349
+
`.npmrc` file in your project:
350
+
351
+
### Available Build Options
352
+
353
+
<details>
354
+
<summary>👉🏻 Options</summary>
355
+
356
+
### Curve with Libsodium support
357
+
358
+
(Enabled by default)
359
+
360
+
Enables CURVE security for encrypted communications. Zeromq uses libsodium for
361
+
CURVE security. To enable CURVE support, add the following to your .npmrc:
362
+
363
+
```ini
364
+
zmq_curve="true"
365
+
zmq_sodium="true"
366
+
```
367
+
368
+
Building libsodium requires these dependencies on Linux/MacOS:
369
+
`autoconf automake libtool`, which can be installed via `apt-get` or `brew`,
370
+
etc.
371
+
372
+
#### Draft support
373
+
374
+
(Enabled by default)
375
+
376
+
By default `libzmq` is built with support for `Draft` patterns (e.g.
377
+
`server-client`, `radio-dish`, `scatter-gather`). If you want to build `libzmq`
378
+
without support for `Draft`, you can specify the following in `.npmrc`:
379
+
380
+
```ini
381
+
zmq_draft=false
382
+
```
383
+
384
+
#### Websocket support
385
+
386
+
Enables WebSocket transport, allowing ZeroMQ to communicate over WebSockets. To
387
+
enable WebSocket support, add the following to your .npmrc:
388
+
389
+
```ini
390
+
zmq_websockets="true"
391
+
```
392
+
393
+
#### Secure Websocket support
394
+
395
+
Enables WebSocket transport with TLS (wss), providing secure WebSocket
396
+
communications. To enable secure WebSocket support, add the following to your
397
+
.npmrc:
398
+
399
+
```ini
400
+
zmq_websockets_secure="true"
401
+
```
402
+
403
+
#### Not Synchronous Resolve
404
+
405
+
Enables immediate send/receive on the socket without synchronous resolution.
406
+
This option can improve performance in certain scenarios by allowing operations
407
+
to proceed without waiting for synchronous resolution. To enable this feature,
408
+
add the following to your `.npmrc`:
409
+
410
+
```ini
411
+
zmq_no_sync_resolve="true"
412
+
```
413
+
414
+
#### MacOS Deployment Target
415
+
416
+
Specifies the minimum macOS version that the binary will be compatible with.
417
+
This is particularly useful when building for different macOS versions. To set
418
+
this, add the following to your .npmrc, replacing 10.15 with your desired
419
+
minimum macOS version:
420
+
421
+
```ini
422
+
macosx_deployment_target="10.15"
423
+
```
424
+
425
+
</details>
426
+
426
427
## Contribution
427
428
428
429
If you are interested in making contributions to this project, please read the
@@ -520,4 +521,5 @@ first outlined in [this issue](https://github.com/zeromq/zeromq.js/issues/189).
520
521
Previous versions of ZeroMQ.js were based on `zmq` and a fork that included
521
522
prebuilt binaries.
522
523
523
-
See detailed changes in the [CHANGELOG](CHANGELOG.md).
0 commit comments