-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #633 from zeromq/opts
- Loading branch information
Showing
19 changed files
with
240 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
public-hoist-pattern[]=* | ||
package-lock=false | ||
lockfile=true | ||
prefer-frozen-lockfile=false | ||
strict-peer-dependencies=false | ||
# Zmq settings | ||
build-from-source=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/docs/ | ||
/docs-raw | ||
/doc-unminified | ||
/lib | ||
/prebuilds | ||
/node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,26 +81,88 @@ source: | |
- CMake 2.8+ | ||
- curl | ||
|
||
To install from source: | ||
To install from source, specify `build_from_source=true` in a `.npmrc` file | ||
|
||
```sh | ||
npm install [email protected] --build-from-source | ||
``` | ||
build_from_source=true | ||
``` | ||
|
||
If you want to link against a shared ZeroMQ library, you can build skip | ||
downloading `libzmq` and link with the installed library instead as follows: | ||
When building from source, you can also specify additional build options in a | ||
`.npmrc` file in your project: | ||
|
||
```sh | ||
npm install [email protected] --zmq-shared | ||
### Available Build Options | ||
|
||
<details> | ||
<summary>👉🏻 Options</summary> | ||
|
||
#### Draft support | ||
|
||
By default `libzmq` is built with support for `Draft` patterns (e.g. | ||
`server-client`, `radio-dish`, `scatter-gather`). If you want to build `libzmq` | ||
without support for `Draft`, you can specify the following in `.npmrc`: | ||
|
||
```ini | ||
zmq_draft=false | ||
``` | ||
|
||
If you wish to use any DRAFT sockets then it is also necessary to compile the | ||
library from source: | ||
#### Not Synchronous Resolve | ||
|
||
```sh | ||
npm install [email protected] --zmq-draft | ||
If you want to send/receive on the socket immediately, you can specify the | ||
following in `.npmrc`: | ||
|
||
```ini | ||
zmq_no_sync_resolve="true" | ||
``` | ||
|
||
#### Shared library support | ||
|
||
If you want to link against a shared ZeroMQ library installed on your system, | ||
you can build skip downloading `libzmq` and link with the installed library | ||
instead by specifying the following in `.npmrc`: | ||
|
||
```ini | ||
zmq_shared=true | ||
``` | ||
|
||
#### Alternative libzmq version | ||
|
||
You can specify an alternative version or Git revision of `libzmq` to build | ||
against by specifying the following in `.npmrc`: | ||
|
||
```ini | ||
zmq_version="4.3.5" | ||
``` | ||
|
||
#### Debug build of libzmq | ||
|
||
If you want to build `libzmq` with debug symbols, you can specify the following | ||
in `.npmrc`: | ||
|
||
```ini | ||
zmq_build_type="Debug" | ||
``` | ||
|
||
#### Cross-compilation for different architectures | ||
|
||
If you want to cross-compile for a different architecture, you can specify the | ||
following in `.npmrc`: | ||
|
||
```ini | ||
arch="arm64" | ||
target_arch="arm64" | ||
``` | ||
|
||
#### MacOS Deployment Target | ||
|
||
If you want to specify the MacOS deployment target, you can specify the | ||
following in `.npmrc`: | ||
|
||
```ini | ||
macos_deployment_target="10.15" | ||
``` | ||
|
||
</details> | ||
|
||
## Examples | ||
|
||
**Note:** These examples assume the reader is familiar with ZeroMQ. If you are | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.