Skip to main content

Crate ferrijs_std

Crate ferrijs_std 

Source
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:

upstreammodule
llrt_utilsutils
llrt_contextcontext
llrt_exceptionsexceptions
llrt_eventsevents
llrt_abortabort
llrt_osos
llrt_fsfs
llrt_path (helpers)pathutil
llrt_encodingencoding
llrt_bufferbuffer
llrt_jsonjson
llrt_cryptocrypto
llrt_stream_webstream_web
llrt_zlibzlib
llrt_compressioncompression
llrt_string_decoderstring_decoder
llrt_perf_hooksperf_hooks
llrt_ttytty
llrt_navigatornavigator
llrt_urlurl
llrt_util (codecs)text
llrt_testtest (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, Blob and File.
compression
Codec back-ends behind zlib (upstream llrt_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_value is 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 fs needs (upstream llrt_path). The path MODULE is this crate’s own; only these Rust helpers come from upstream, so fs stays byte-close to it.
perf_hooks
permissions
The realm’s permission container, and the checks every module makes.
stream_web
string_decoder
text
TextEncoder / TextDecoder and their stream forms, from upstream llrt_util. Only the codecs are taken: format, inherits, styleText and inspect are crate::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§

count_members
define_cb_function
define_sync_function
iterable_enum
str_enum

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 and navigator.