@stll/anonymize-wasm 2.5.0 → 2.6.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/README.md CHANGED
@@ -36,7 +36,7 @@ const pipeline = await loadPipeline(
36
36
  );
37
37
  ```
38
38
 
39
- With Vite, register the helper plugin so the wasm binary, WASI worker, and
39
+ With Vite, register the helper plugin so the wasm binary, ESM glue, and
40
40
  `.stlanonpkg` assets survive both dependency pre-bundling (dev) and a
41
41
  production `vite build` (the plugin emits the `native/` assets and rewrites the
42
42
  runtime asset base to point at them):
@@ -49,8 +49,8 @@ import stllAnonymizeWasm from "@stll/anonymize-wasm/vite";
49
49
  By default the plugin emits every bundled prepared package into your build. The
50
50
  full-dictionary default package alone is large (~20 MB), plus the per-language
51
51
  `cs`, `de`, and `en` variants. If your app only needs some of them, restrict the
52
- emitted packages with the `packages` option (the wasm binary, glue, and workers
53
- are always emitted):
52
+ emitted packages with the `packages` option (the wasm binary and glue are
53
+ always emitted):
54
54
 
55
55
  ```ts
56
56
  // Emit only the Czech scoped package.
@@ -80,34 +80,25 @@ app actually loads, or load your own package bytes through `loadPipeline`.
80
80
  ## Notes
81
81
 
82
82
  - Same redaction core as `@stll/anonymize`, running in WebAssembly.
83
- - The binding targets `wasm32-wasip1-threads` (shared memory), so it needs a
84
- cross-origin-isolated context (`SharedArrayBuffer`) in the browser.
83
+ - The binding targets single-thread `wasm32-unknown-unknown`. It runs in ordinary
84
+ browser contexts without `SharedArrayBuffer`, Web Workers, COOP, or COEP.
85
85
 
86
86
  ## Third-party licenses
87
87
 
88
- The shipped browser WASI glue (`dist/native/index.wasi-browser.js` and
89
- `dist/native/wasi-worker-browser.mjs`) is bundled at build time and inlines the
90
- following MIT-licensed runtime so it is self-contained for consumer bundlers:
91
-
92
- - `@napi-rs/wasm-runtime` (MIT) — Copyright (c) napi-rs authors —
93
- https://github.com/napi-rs/napi-rs
94
- - `@tybys/wasm-util` (MIT) — Copyright (c) toyobayashi —
95
- https://github.com/toyobayashi/wasm-util
96
-
97
- Both are distributed under the MIT License; the full license text is available
98
- in each project's repository.
88
+ See the package's `LICENSE` and the repository root `ATTRIBUTION.md` for
89
+ dependency attribution.
99
90
 
100
91
  ## Building from source
101
92
 
102
- The wasm binding is generated by napi-rs and is not checked in:
93
+ The wasm binding is generated by wasm-bindgen and is not checked in:
103
94
 
104
95
  ```bash
105
96
  cd packages/anonymize
106
- bun run build:native-wasm # needs the wasm32-wasip1-threads Rust target
97
+ bun run build:native-wasm # needs the wasm32-unknown-unknown Rust target
107
98
  bun run build # tsdown + native node binding
108
99
  bun run build:wasm-assets # copy glue + build compressed packages into wasm/dist/native
109
100
  ```
110
101
 
111
- The `wasm32-wasip1-threads` target is pinned in `rust-toolchain.toml`, so
102
+ The `wasm32-unknown-unknown` target is pinned in `rust-toolchain.toml`, so
112
103
  `rustup` installs it automatically; with a non-rustup toolchain run
113
- `rustup target add wasm32-wasip1-threads` first.
104
+ `rustup target add wasm32-unknown-unknown` first.