Skip to content

Commit 2790cbb

Browse files
committed
docs: move the build docs in readme
1 parent 2069817 commit 2790cbb

File tree

2 files changed

+140
-140
lines changed

2 files changed

+140
-140
lines changed

README.md

Lines changed: 139 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@
2828
- [Useful links](#useful-links)
2929
- [Table of contents](#table-of-contents)
3030
- [Installation](#installation)
31-
- [Prebuilt binaries](#prebuilt-binaries)
32-
- [Building from source](#building-from-source)
33-
- [Available Build Options](#available-build-options)
34-
- [Curve with Libsodium support](#curve-with-libsodium-support)
35-
- [Draft support](#draft-support)
36-
- [Websocket support](#websocket-support)
37-
- [Secure Websocket support](#secure-websocket-support)
38-
- [Not Synchronous Resolve](#not-synchronous-resolve)
39-
- [MacOS Deployment Target](#macos-deployment-target)
4031
- [Examples](#examples)
4132
- [Basic Usage](#basic-usage)
4233
- [Push/Pull](#pushpull)
@@ -50,6 +41,15 @@
5041
- [`server.js`](#serverjs)
5142
- [Zeromq 4 and 5 Compatibility layer](#zeromq-4-and-5-compatibility-layer)
5243
- [TypeScript](#typescript)
44+
- [Prebuilt binaries](#prebuilt-binaries)
45+
- [Building from source](#building-from-source)
46+
- [Available Build Options](#available-build-options)
47+
- [Curve with Libsodium support](#curve-with-libsodium-support)
48+
- [Draft support](#draft-support)
49+
- [Websocket support](#websocket-support)
50+
- [Secure Websocket support](#secure-websocket-support)
51+
- [Not Synchronous Resolve](#not-synchronous-resolve)
52+
- [MacOS Deployment Target](#macos-deployment-target)
5353
- [Contribution](#contribution)
5454
- [Dependencies](#dependencies)
5555
- [Defining new options](#defining-new-options)
@@ -67,139 +67,12 @@ npm install zeromq
6767

6868
Supported versions:
6969

70-
- 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))
19871

19972
## Examples
20073

20174
Here some examples of different features are provided. More examples can be
202-
found in the [examples directory](examples).
75+
found in the [examples directory](https://github.com/zeromq/zeromq.js/tree/master/examples).
20376

20477
You can also browse
20578
[the API reference documentation](http://zeromq.github.io/zeromq.js/globals.html)
@@ -423,6 +296,133 @@ _Requirements_
423296
include their corresponding polyfills if needed): `es2015`,
424297
`ESNext.AsyncIterable`
425298

299+
### Prebuilt binaries
300+
301+
The following platforms have a **prebuilt binary** available:
302+
303+
- Windows on x86/x86-64
304+
305+
Zeromq binaries on Windows 10 or older need
306+
[Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version)
307+
to be installed.
308+
309+
- Linux on x86-64 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:
310+
- Debian 9+ (Stretch or later)
311+
- Ubuntu 16.04+ (Xenial or later)
312+
- CentOS 8+
313+
- Linux on x86-64 with musl, for example:
314+
- Alpine 3.3+
315+
- MacOS 10.9+ on x86-64
316+
317+
If a prebuilt binary is not available for your platform, installing will attempt
318+
to start a build from source.
319+
320+
### Building from source
321+
322+
If a prebuilt binary is unavailable, or if you want to pass certain options
323+
during build, you can build this package from source.
324+
325+
Make sure you have the following installed before attempting to build from
326+
source:
327+
328+
- Node.js 10+ or Electron
329+
- C++17 compiler toolchain (e.g. LLVM, GCC, MSVC)
330+
- Python 3
331+
- CMake 3.16+
332+
- vcpkg dependencies (e.g. on Linux it needs curl, unzip, zip, tar, git,
333+
pkg-config)
334+
335+
For Curve:
336+
337+
- automake
338+
- autoconf
339+
- libtool
340+
341+
To install from source, specify `build_from_source=true` in a `.npmrc` file
342+
343+
```
344+
build_from_source=true
345+
```
346+
347+
When building from source, you can also specify additional build options in a
348+
`.npmrc` file in your project:
349+
350+
### Available Build Options
351+
352+
<details>
353+
<summary>👉🏻 Options</summary>
354+
355+
### Curve with Libsodium support
356+
357+
(Enabled by default)
358+
359+
Enables CURVE security for encrypted communications. Zeromq uses libsodium for
360+
CURVE security. To enable CURVE support, add the following to your .npmrc:
361+
362+
```ini
363+
zmq_curve="true"
364+
zmq_sodium="true"
365+
```
366+
367+
Building libsodium requires these dependencies on Linux/MacOS:
368+
`autoconf automake libtool`, which can be installed via `apt-get` or `brew`,
369+
etc.
370+
371+
#### Draft support
372+
373+
(Enabled by default)
374+
375+
By default `libzmq` is built with support for `Draft` patterns (e.g.
376+
`server-client`, `radio-dish`, `scatter-gather`). If you want to build `libzmq`
377+
without support for `Draft`, you can specify the following in `.npmrc`:
378+
379+
```ini
380+
zmq_draft=false
381+
```
382+
383+
#### Websocket support
384+
385+
Enables WebSocket transport, allowing ZeroMQ to communicate over WebSockets. To
386+
enable WebSocket support, add the following to your .npmrc:
387+
388+
```ini
389+
zmq_websockets="true"
390+
```
391+
392+
#### Secure Websocket support
393+
394+
Enables WebSocket transport with TLS (wss), providing secure WebSocket
395+
communications. To enable secure WebSocket support, add the following to your
396+
.npmrc:
397+
398+
```ini
399+
zmq_websockets_secure="true"
400+
```
401+
402+
#### Not Synchronous Resolve
403+
404+
Enables immediate send/receive on the socket without synchronous resolution.
405+
This option can improve performance in certain scenarios by allowing operations
406+
to proceed without waiting for synchronous resolution. To enable this feature,
407+
add the following to your `.npmrc`:
408+
409+
```ini
410+
zmq_no_sync_resolve="true"
411+
```
412+
413+
#### MacOS Deployment Target
414+
415+
Specifies the minimum macOS version that the binary will be compatible with.
416+
This is particularly useful when building for different macOS versions. To set
417+
this, add the following to your .npmrc, replacing 10.15 with your desired
418+
minimum macOS version:
419+
420+
```ini
421+
macosx_deployment_target="10.15"
422+
```
423+
424+
</details>
425+
426426
## Contribution
427427

428428
If you are interested in making contributions to this project, please read the
@@ -520,4 +520,4 @@ first outlined in [this issue](https://github.com/zeromq/zeromq.js/issues/189).
520520
Previous versions of ZeroMQ.js were based on `zmq` and a fork that included
521521
prebuilt binaries.
522522

523-
See detailed changes in the [CHANGELOG](CHANGELOG.md).
523+
See detailed changes in the [CHANGELOG](https://github.com/zeromq/zeromq.js/releases).

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export interface Writable<
158158
*
159159
* * If you wish to send on a socket and **messages should be queued before
160160
* they are dropped**, you should implement a [simple
161-
* queue](examples/queue/queue.ts) in JavaScript. Such a queue is not
161+
* queue](../examples/queue/queue.ts) in JavaScript. Such a queue is not
162162
* provided by this library because most real world applications need to
163163
* deal with undeliverable messages in more complex ways - for example, they
164164
* might need to reply with a status message; or first retry delivery a

0 commit comments

Comments
 (0)