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
{{ message }}
Repository navigation
Commit 4096767
Browse filesBrowse the repository at this point in the historyBrowse files
PR-URL: #66721
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Each JavaScript module already embeds its WASM binary in base64. Separate `.wasm`
158
+
files, unbundled modules, debug packages and package metadata are not copied.
159
+
Temporary Docker outputs are removed when the script finishes. The script does
160
+
not download or update milo's sources; Docker still downloads the image and build
161
+
dependencies as needed.
162
+
163
+
The shared-builtin CI job removes the bundled Milo modules and rebuilds them
164
+
before compiling Node.js, so that it cannot silently reuse prebuilt artifacts.
165
+
The npm package contains only the license and the two bundled JavaScript modules;
166
+
`lib/milo/binary`, `lib/milo/src` and separate WASM files are excluded.
167
+
168
+
#### Submit the update
169
+
170
+
Include the updated sources in `deps/milo`, generated files in `lib/milo` and
171
+
the documentation update in a manually prepared PR. This step prepares milo's
172
+
build inputs; it does not modify
173
+
the runtime parser, llhttp's build script or any workflows.
174
+
93
175
<aid="update-wpts"></a>
94
176
### Update `WPTs`
95
177
@@ -176,9 +258,9 @@ Use the "Create release PR" github action to generate a release PR.
176
258
If you are packaging `undici` for a distro, this might help if you would like to use
177
259
an unbundled version instead of bundling one in `libnode.so`.
178
260
179
-
To enable this, pass `EXTERNAL_PATH=/path/to/global/node_modules/undici` to `build/wasm.js`.
261
+
To enable this, pass `EXTERNAL_PATH=/path/to/global/node_modules/undici` to `build/llhttp.js`.
180
262
Pass this path with `loader.js` appended to `--shared-builtin-undici/undici-path` in Node.js's `configure.py`.
181
-
If building on a non-Alpine Linux distribution, you may need to also set the `WASM_CC`, `WASM_CFLAGS`, `WASM_LDFLAGS` and `WASM_LDLIBS` environment variables before running `build/wasm.js`.
263
+
If building on a non-Alpine Linux distribution, you may need to also set the `WASM_CC`, `WASM_CFLAGS`, `WASM_LDFLAGS` and `WASM_LDLIBS` environment variables before running `build/llhttp.js`.
182
264
Similarly, you can set the `WASM_OPT` environment variable to utilize your own `wasm-opt` optimizer.
Copy file name to clipboardExpand all lines: deps/undici/src/README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,24 @@ Using [benchmark-http2.js](https://github.com/nodejs/undici/blob/main/benchmarks
86
86
87
87
Node.js includes a built-in `fetch()` implementation powered by undici starting from Node.js v18. However, there are important differences between using the built-in fetch and installing undici as a separate module.
88
88
89
+
### WebAssembly requirement
90
+
91
+
Undici's HTTP/1 parser requires WebAssembly. There is no alternative parser when
92
+
WebAssembly is unavailable, for example in Node.js configurations where
93
+
`--jitless` disables it. The existence of `fetch` does not imply that it can make
94
+
HTTP/1 requests in that environment.
95
+
96
+
When the HTTP/1 parser is needed without WebAssembly, Client and dispatcher
97
+
requests fail with an `Error` whose code is `ERR_WEBASSEMBLY_NOT_SUPPORTED`.
98
+
`fetch` rejects with a `TypeError` carrying that error in `error.cause`. Importing
99
+
Undici, accessing `fetch`, and using `Headers`, `FormData`, `Request`, or `Response`
100
+
do not themselves require the HTTP/1 parser.
101
+
102
+
The error is defined locally in Undici and does not depend on Node.js providing
103
+
that error code. For built-in fetch, this behavior depends on the bundled Undici
104
+
version. Node.js receives upstream fixes through its normal vendored Undici
105
+
update, rather than changes to the generated bundle alone.
106
+
89
107
### Built-in Fetch (Node.js v18+)
90
108
91
109
Node.js's built-in fetch is powered by a bundled version of undici:
@@ -773,14 +791,18 @@ and `undici.Agent`) which will enable the family autoselection algorithm when es
Copyright (c) 2023, and above Paolo Insogna, NearForm and other contributors
4
+
5
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0 commit comments