Skip to content

Commit eb13cdb

Browse files
committed
docs: update setup readme
1 parent b57af9e commit eb13cdb

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/scripts/libmongocrypt.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export async function downloadLibMongoCrypt(nodeDepsRoot, { ref, crypto, fastDow
200200
process.stderr.write(chunk, () => {
201201
if (isFirstStdoutDataEv) {
202202
isFirstStdoutDataEv = false;
203-
timeout = setTimeout(() => controller.abort(), 10_000);
203+
timeout = setTimeout(() => controller.abort(), 5_000);
204204
}
205205
timeout?.refresh();
206206
});

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,32 @@ npm install mongodb-client-encryption
2727

2828
#### Setup
2929

30-
Run the following command to build libmongocrypt and setup the node bindings for development:
30+
Run the following command to build libmongocrypt and you are setup to develop the node bindings:
3131

3232
```shell
33-
bash ./etc/build-static.sh
33+
npm run install:libmongocrypt
34+
```
35+
36+
#### `libmongocrypt.mjs`
37+
38+
```
39+
node libmongocrypt.mjs [--gitURL=string] [--libVersion=string] [--clean] [--build] [--no-crypto] [--fastDownload]
40+
41+
By default attempts to download and compile the bindings with the crypto prebuilds of libmongocrypt.
42+
Can be configured to clone and build without crypto.
43+
44+
--gitURL=string A custom remote git repository to clone libmongocrypt from. You must also set --build to use this.
45+
--libVersion=string A custom version reference to either download or checkout after cloning.
46+
You may use "latest" to get current libmongocrypt `HEAD`.
47+
--clean Combined with --build, the script will not skip cloning and rebuilding libmongocrypt.
48+
--build Instead of downloading, clone and build libmongocrypt along with the bindings.
49+
--no-crypto Use libmongocrypt prebuild or build libmongocrypt without OpenSSL symbols.
50+
Requires the bindings to provide cryptoCallbacks.
51+
52+
Only suitable for local development:
53+
54+
--fastDownload If you are improving this script or otherwise repeatedly downloading libmongocrypt,
55+
this flag will interrupt the un-tar operation as early as possible. It should work, most of the time.
3456
```
3557

3658
#### Prebuild Platforms

0 commit comments

Comments
 (0)