rusteerio 0.1.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/README.md +7 -0
- package/THIRD_PARTY_NOTICES.md +32 -1
- package/dist/{chunk-DKULX6VO.mjs → chunk-DMRD3FGC.mjs} +1 -1
- package/dist/chunk-DMRD3FGC.mjs.map +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/slim.cjs.map +1 -1
- package/dist/slim.mjs +1 -1
- package/native/src/arena.rs +54 -535
- package/native/src/codec.rs +62 -18
- package/native/src/hook_sink.rs +77 -3
- package/native/src/lib.rs +245 -18
- package/native/src/markup_tokenizer.rs +668 -0
- package/native/src/tokenizer.rs +355 -199
- package/native/vendor/README.md +3 -2
- package/native/vendor/html5ever-0.35.0/src/tokenizer/mod.rs +23 -13
- package/package.json +1 -1
- package/rusteerio.darwin-arm64.node +0 -0
- package/rusteerio.darwin-x64.node +0 -0
- package/rusteerio.linux-arm64-gnu.node +0 -0
- package/rusteerio.linux-arm64-musl.node +0 -0
- package/rusteerio.linux-x64-gnu.node +0 -0
- package/rusteerio.linux-x64-musl.node +0 -0
- package/rusteerio.win32-arm64-msvc.node +0 -0
- package/rusteerio.win32-x64-msvc.node +0 -0
- package/scripts/generate-notices.mjs +11 -0
- package/scripts/notices/htmlparser2-MIT.txt +18 -0
- package/scripts/notices/sources.json +6 -0
- package/src/router.ts +3 -2
- package/dist/chunk-DKULX6VO.mjs.map +0 -1
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/README.md
CHANGED
|
@@ -147,6 +147,13 @@ Fresh Rust-backed nodes have Rusteerio's constructors: an `instanceof` check
|
|
|
147
147
|
against an independently installed `domhandler.Element` requires importing those
|
|
148
148
|
nodes or supplying a tree adapter that creates that class.
|
|
149
149
|
|
|
150
|
+
Each document reports its approximate native size to V8, so the garbage
|
|
151
|
+
collector reclaims unreachable documents under native memory pressure. Node.js
|
|
152
|
+
frees native memory after the current task completes. A long synchronous loop,
|
|
153
|
+
or a chain of already-resolved `await`s, that loads many large documents should
|
|
154
|
+
yield to the event loop periodically, for example with `await setImmediate()`
|
|
155
|
+
from `node:timers/promises`.
|
|
156
|
+
|
|
150
157
|
## Benchmarks
|
|
151
158
|
|
|
152
159
|
These measurements compare **Cheerio 1.2.0** against rusteerio on a Linux x64
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -4,7 +4,7 @@ This file preserves third-party license and attribution notices for the Rust nat
|
|
|
4
4
|
|
|
5
5
|
Generated by `node scripts/generate-notices.mjs` from `cargo metadata --locked`, crate license files, and the pinned supplemental sources recorded in `scripts/notices/sources.json`. It includes build dependencies and dependencies for all target platforms; a particular binary may use a subset. Identical notice texts are reproduced once and referenced below. The html5ever, markup5ever and html5gum crates contain local observer-hook and opt-in UTF-16 transport patches; their complete patched source and original notices are included in `native/vendor`. Other dependency source files are unmodified.
|
|
6
6
|
|
|
7
|
-
Cargo.lock SHA-256: `
|
|
7
|
+
Cargo.lock SHA-256: `42f353a71e79c84b5415fbfa8581ddd3c1aefa2b8c15f78a876631c8a9be2a68`.
|
|
8
8
|
|
|
9
9
|
## Source availability
|
|
10
10
|
|
|
@@ -18,6 +18,12 @@ The vendored compatibility suite and fixtures come from Cheerio 1.2.0, commit `e
|
|
|
18
18
|
|
|
19
19
|
- [Cheerio MIT LICENSE](#notice-61c1e21d3a8ff20f) — [upstream source](https://github.com/cheeriojs/cheerio/blob/e3c7aaf9ed64fe3cb9a181e58a41c0fdd6dbfbfc/LICENSE)
|
|
20
20
|
|
|
21
|
+
## htmlparser2 tokenizer port
|
|
22
|
+
|
|
23
|
+
The htmlparser2-compatible markup tokenizer in `native/src/markup_tokenizer.rs` ports the state machine of htmlparser2 10.1.0, commit `57ace50bf6eb3bfab0468deafe10d0a8a2f233aa`. Its original MIT notice is reproduced here.
|
|
24
|
+
|
|
25
|
+
- [htmlparser2 MIT LICENSE](#notice-204cfa747341660e) — [upstream source](https://github.com/fb55/htmlparser2/blob/57ace50bf6eb3bfab0468deafe10d0a8a2f233aa/LICENSE)
|
|
26
|
+
|
|
21
27
|
## Rust dependencies (112 locked packages)
|
|
22
28
|
|
|
23
29
|
### aho-corasick 1.1.5
|
|
@@ -2547,6 +2553,31 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
2547
2553
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
2548
2554
|
```
|
|
2549
2555
|
|
|
2556
|
+
<a id="notice-204cfa747341660e"></a>
|
|
2557
|
+
|
|
2558
|
+
### Notice 204cfa747341660e
|
|
2559
|
+
|
|
2560
|
+
```text
|
|
2561
|
+
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
|
2562
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2563
|
+
of this software and associated documentation files (the "Software"), to
|
|
2564
|
+
deal in the Software without restriction, including without limitation the
|
|
2565
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
2566
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
2567
|
+
furnished to do so, subject to the following conditions:
|
|
2568
|
+
|
|
2569
|
+
The above copyright notice and this permission notice shall be included in
|
|
2570
|
+
all copies or substantial portions of the Software.
|
|
2571
|
+
|
|
2572
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2573
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2574
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2575
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2576
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
2577
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
2578
|
+
IN THE SOFTWARE.
|
|
2579
|
+
```
|
|
2580
|
+
|
|
2550
2581
|
<a id="notice-209fbbe0ad52d923"></a>
|
|
2551
2582
|
|
|
2552
2583
|
### Notice 209fbbe0ad52d923
|