Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ the user's WIT world:

- `logging`: enables the `wasi:logging` import to be used for the JavaScript `console` API
- `sqlite`: enables the `node:sqlite` module with an embedded SQLite database engine
- `crypto`, `crypto-full`, `zlib`, `brotli`, `encoding`, `timezone`, `websocket` and `golem`
- `crypto`, `crypto-full`, `zlib`, `brotli`, `zstd`, `encoding`, `timezone`, `websocket` and `golem`
enable the corresponding builtin capabilities

The default `normal-p3` tier enables `logging`, `crypto`, `zlib` and `encoding`; `full-p3` adds
`crypto-full`, `brotli`, `sqlite` and `timezone`, and `full-no-logging-p3` is `full-p3` without
`crypto-full`, `brotli`, `zstd`, `sqlite` and `timezone`, and `full-no-logging-p3` is `full-p3` without
`logging`. `fetch` and `node:http` always use `wasi:http`. Keep the `p3` feature in custom feature
lists: it enables the `wit-bindgen-p3` dependency, which a `--dependency wit-bindgen-p3=...`
replacement must therefore declare with `optional = true`.
Expand Down Expand Up @@ -1336,11 +1336,17 @@ throws immediately. Environment-data APIs are unavailable.
<details>
<summary><strong><code>node:zlib</code></strong></summary>

- **Classes:** `Deflate`, `Inflate`, `Gzip`, `Gunzip`, `DeflateRaw`, `InflateRaw`, `Unzip`, `BrotliCompress`, `BrotliDecompress`
- **Factory:** `createGzip`, `createGunzip`, `createDeflate`, `createInflate`, `createDeflateRaw`, `createInflateRaw`, `createUnzip`, `createBrotliCompress`, `createBrotliDecompress`
- **Async:** `gzip`, `gunzip`, `deflate`, `inflate`, `deflateRaw`, `inflateRaw`, `unzip`, `brotliCompress`, `brotliDecompress`
- **Sync:** `gzipSync`, `gunzipSync`, `deflateSync`, `inflateSync`, `deflateRawSync`, `inflateRawSync`, `unzipSync`, `brotliCompressSync`, `brotliDecompressSync`
- **Classes:** `Deflate`, `Inflate`, `Gzip`, `Gunzip`, `DeflateRaw`, `InflateRaw`, `Unzip`, `BrotliCompress`, `BrotliDecompress`, `ZstdCompress`, `ZstdDecompress`
- **Factory:** `createGzip`, `createGunzip`, `createDeflate`, `createInflate`, `createDeflateRaw`, `createInflateRaw`, `createUnzip`, `createBrotliCompress`, `createBrotliDecompress`, `createZstdCompress`, `createZstdDecompress`
- **Async:** `gzip`, `gunzip`, `deflate`, `inflate`, `deflateRaw`, `inflateRaw`, `unzip`, `brotliCompress`, `brotliDecompress`, `zstdCompress`, `zstdDecompress`
- **Sync:** `gzipSync`, `gunzipSync`, `deflateSync`, `inflateSync`, `deflateRawSync`, `inflateRawSync`, `unzipSync`, `brotliCompressSync`, `brotliDecompressSync`, `zstdCompressSync`, `zstdDecompressSync`
- `crc32`, `constants`, `codes`
- Zstandard constants are available through `constants` and direct `ZSTD_*` aliases on the default/CommonJS export.
- Zstandard requires the optional `zstd` feature (included in the full tiers). It uses the reference
zstd codec with worker threads disabled for WASI; `normal-p3` does not include that codec.
The APIs remain discoverable without the feature, but calls throw `ERR_ZLIB_INITIALIZATION_FAILED`.
This generic initialization error can also indicate invalid codec parameters; check the build's
enabled features before diagnosing a parameter failure.

</details>

Expand Down
32 changes: 32 additions & 0 deletions crates/wasm-rquickjs/skeleton/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions crates/wasm-rquickjs/skeleton/Cargo.toml_
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ internal-test-execution = ["test-observability"]
# Capability tiers (cumulative). The runtime ships its own `wasi:http@0.3` based fetch and
# node:http unconditionally.
normal-p3 = ["p3", "crypto", "zlib", "logging", "encoding"]
full-p3 = ["normal-p3", "crypto-full", "brotli", "sqlite", "timezone"]
full-no-logging-p3 = ["p3", "crypto", "zlib", "encoding", "crypto-full", "brotli", "sqlite", "timezone"]
full-p3 = ["normal-p3", "crypto-full", "brotli", "zstd", "sqlite", "timezone"]
full-no-logging-p3 = ["p3", "crypto", "zlib", "encoding", "crypto-full", "brotli", "zstd", "sqlite", "timezone"]

logging = ["dep:wasi-logging"]
encoding = ["dep:encoding_rs"]
zlib = ["dep:flate2", "dep:crc32fast"]
brotli = ["dep:brotli"]
zstd = ["zlib", "dep:zstd-safe"]

# Crypto: common subset
crypto = [
Expand Down Expand Up @@ -159,6 +160,7 @@ sec1 = { version = "0.8", default-features = false, features = ["der", "alloc",
base64ct = { version = "1", features = ["alloc"] }
flate2 = { version = "1", default-features = false, features = ["rust_backend"], optional = true }
brotli = { version = "7", default-features = false, features = ["std"], optional = true }
zstd-safe = { version = "7.2.4", default-features = false, features = ["std"], optional = true }
crc32fast = { version = "1", optional = true }
# WASI Preview 2 bindings for the residual synchronous interfaces (see the `p3` feature).
wasip2 = "1.0"
Expand Down
Loading
Loading