Expand description
Vendored subset of awslabs/llrt
(Apache-2.0): the WHATWG Streams implementation plus the pieces it
needs (llrt_utils, llrt_events, llrt_exceptions, llrt_abort).
Upstream crate -> module here:
| upstream | module |
|---|---|
llrt_utils | utils |
llrt_context | context |
llrt_exceptions | exceptions |
llrt_events | events |
llrt_abort | abort |
llrt_os | os |
llrt_fs | fs |
llrt_path (helpers) | pathutil |
llrt_encoding | encoding |
llrt_buffer | buffer |
llrt_json | json |
llrt_crypto | crypto |
llrt_stream_web | stream_web |
llrt_zlib | zlib |
llrt_compression | compression |
llrt_string_decoder | string_decoder |
llrt_perf_hooks | perf_hooks |
llrt_tty | tty |
llrt_navigator | navigator |
llrt_url | url |
llrt_util (codecs) | text |
llrt_test | test (dev) |
Sources are kept byte-close to upstream — only crate:: / llrt_*
path prefixes are rewritten — so a re-sync stays a mechanical diff.
Host-specific behaviour belongs in the embedding runtime, not here.
Modules§
- abort
- buffer
- Vendored
llrt_buffer:Buffer,BlobandFile. - compression
- Codec back-ends behind
zlib(upstreamllrt_compression). - context
- crypto
- encoding
- events
- exceptions
- fs
- identity
- Which runtime a script believes it is running in.
- json
- modules
- The Node / web modules this crate serves, and the one table a host registers them from.
- navigator
- node
- Node modules this crate implements itself, because upstream llrt has
none or only a stub. Written to the repo’s style, but compiled under
this crate’s relaxed lints: pedantic’s
needless_pass_by_valueis unsatisfiable for rquickjs callback signatures, which must take owned JS values. Node modules with no usable upstream in llrt, written here so the runtime has exactly one implementation of each. - os
- pathutil
- Path helpers the vendored
fsneeds (upstreamllrt_path). ThepathMODULE is this crate’s own; only these Rust helpers come from upstream, sofsstays byte-close to it. - perf_
hooks - permissions
- The realm’s permission container, and the checks every module makes.
- stream_
web - string_
decoder - text
TextEncoder/TextDecoderand their stream forms, from upstreamllrt_util. Only the codecs are taken:format,inherits,styleTextandinspectarecrate::node::util’s.- tty
- url
- utils
- web
- Web-platform globals with no upstream in llrt, written here so the
runtime has exactly one implementation of each.
Web-platform globals with no upstream in llrt:
atob/btoa,structuredClone,performance,FormData, the compression streams and the timers. - zlib
Macros§
Functions§
- init
- Install every web-standard global on
ctx:DOMException,Event/EventTarget,AbortController/AbortSignal, the full Streams surface,Buffer/Blob/File,crypto, the text codecs,URL/URLSearchParams,atob/btoa,structuredClone,performance,FormData, the compression streams andnavigator.