@scanly/engine-zxing-cpp-wasm 2.0.0 → 2.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/README.md CHANGED
@@ -1,28 +1,24 @@
1
1
  # @scanly/engine-zxing-cpp-wasm
2
2
 
3
- Experimental, optional ZXing-C++ WebAssembly engine for Scanly SDK v2 Alpha.5.
4
- The public Alpha.5 mask enables QR Code Model 2, Data Matrix ECC 200, PDF417, Code 128, EAN-13, EAN-8, UPC-A, and UPC-E. Requests remain format-filtered; the engine never receives an implicit all-formats mask.
3
+ Optional, lazy ZXing-C++ WebAssembly engine for Scanly SDK v2.0.1. It implements the public QR Code, Data Matrix, PDF417, Code 128, EAN-13, EAN-8, UPC-A, and UPC-E format mappings.
5
4
 
6
- The package never downloads code by default. Its loader resolves the packaged
7
- WASM asset relative to the installed package, verifies SHA-256, and initializes
8
- only when requested. Concurrent initialization calls share one promise.
5
+ ```bash
6
+ npm install @scanly/engine-zxing-cpp-wasm
7
+ ```
9
8
 
10
9
  ```ts
11
10
  import { createZxingCppWasmEngine } from "@scanly/engine-zxing-cpp-wasm";
12
11
 
13
12
  const engine = createZxingCppWasmEngine({ variant: "auto" });
14
13
  await engine.initialize();
15
- // Register engine in a Scanly EngineRegistry, reuse it, then:
14
+ // Register the engine in a Scanly EngineRegistry and reuse it.
16
15
  await engine.dispose();
17
16
  ```
18
17
 
19
- Browser and Worker deployments must serve `wasm/zxing-cpp.wasm` with
20
- `application/wasm`. Node reads the same asset from the installed package.
21
- Consumers with a custom asset pipeline can provide `assetResolver`; the URL is
22
- a trusted-code boundary and should not accept untrusted user input.
18
+ Requests remain explicitly format-filtered. The loader resolves the packaged WASM asset, verifies SHA-256, deduplicates concurrent initialization, and never downloads mutable code by default. Browser/Worker deployments must emit the packaged asset and serve it as `application/wasm`; custom `assetResolver` URLs are trusted-code boundaries.
19
+
20
+ The shipped asset is standard WASM. SIMD selection is implemented, but no SIMD performance claim is made without a separately shipped and measured SIMD asset. Cancellation during synchronous native execution is cooperative.
21
+
22
+ This is an advanced public engine package. Browser and Node use it automatically unless `zxingCppWasm: false` is configured.
23
23
 
24
- The current pinned upstream distribution has a standard WASM asset only.
25
- SIMD detection and selection are implemented, but Alpha.4 does not report SIMD
26
- acceleration until a separately built and benchmarked SIMD artifact is present.
27
- Cancellation during native execution is cooperative: Scanly suppresses a late
28
- result, but does not claim preemptive interruption of synchronous native code.
24
+ Version: 2.0.1 · [WASM deployment documentation](https://github.com/Yangjunjie-Lin/Scanly/blob/main/docs/wasm-engine.md)
package/package.json CHANGED
@@ -1,7 +1,17 @@
1
1
  {
2
2
  "name": "@scanly/engine-zxing-cpp-wasm",
3
- "version": "2.0.0",
4
- "description": "Experimental ZXing-C++ WebAssembly QR engine for Scanly SDK v2",
3
+ "version": "2.0.1",
4
+ "description": "Multi-format ZXing-C++ WebAssembly barcode engine for Scanly SDK",
5
+ "keywords": ["barcode", "qr-code", "wasm", "webassembly", "zxing", "scanly"],
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Yangjunjie-Lin/Scanly.git",
9
+ "directory": "engines/zxing-cpp-wasm"
10
+ },
11
+ "homepage": "https://github.com/Yangjunjie-Lin/Scanly#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Yangjunjie-Lin/Scanly/issues"
14
+ },
5
15
  "license": "MIT",
6
16
  "type": "module",
7
17
  "sideEffects": false,
@@ -30,7 +40,7 @@
30
40
  "wasm:verify": "node scripts/verify-wasm.mjs"
31
41
  },
32
42
  "dependencies": {
33
- "@scanly/core": "2.0.0",
43
+ "@scanly/core": "2.0.1",
34
44
  "zxing-wasm": "3.1.1"
35
45
  }
36
46
  }
@@ -1,59 +1,59 @@
1
- {
2
- "schemaVersion": "1.0",
3
- "distribution": {
4
- "name": "zxing-wasm",
5
- "version": "3.1.1",
6
- "sourceCommit": "41d92eadda2a556dff9a044ff29fd3e41e70c657",
7
- "integrity": "sha512-g0sPJBIubO6zLcJh1jftLPIN6xziaqLsvLgtpGKwDrEhyXXqla3E3yjFrznlr78UHIOMzbJPi0HDWKs/KgaB7A=="
8
- },
9
- "upstream": {
10
- "name": "zxing-cpp",
11
- "commit": "6c2961d2a9ea4bc4e4ae8f37b1497299f04dd861",
12
- "license": "Apache-2.0"
13
- },
14
- "toolchain": {
15
- "emscripten": "5.0.4",
16
- "cmakeMinimum": "3.14",
17
- "canonicalEnvironment": "ubuntu-24.04 x64, Node 24, Emscripten 5.0.4"
18
- },
19
- "build": {
20
- "timestampPolicy": "No Scanly timestamp is embedded; the pinned distribution artifact is byte-for-byte verified.",
21
- "readerOnly": true,
22
- "flags": [
23
- "-O3",
24
- "-fexceptions",
25
- "-s DISABLE_EXCEPTION_CATCHING=0",
26
- "-s ENVIRONMENT=web,worker",
27
- "-s FILESYSTEM=0",
28
- "-s EXPORT_ES6=1",
29
- "-s MODULARIZE=1",
30
- "-s DYNAMIC_EXECUTION=0",
31
- "-s ALLOW_MEMORY_GROWTH=1",
32
- "-s STACK_SIZE=5242880"
33
- ],
34
- "sourceHash": "774330bd90c99c99f2fa710508cc64ed0f3aac97cd8795e575d5384aadd93bdc",
35
- "glueSha256": "fb8ec6dfa03c4d1c32925b53db7b40da9acaf978a3f704bb8ceb2ba7f6edf33a"
36
- },
37
- "assets": {
38
- "standard": {
39
- "file": "zxing-cpp.wasm",
40
- "available": true,
41
- "sha256": "6a858c01e076bab3a1bd413e4f2cf5e5e45f819a0d9441d83c66993bc48ed38f",
42
- "bytes": 1065634,
43
- "simd": false
44
- },
45
- "simd": {
46
- "file": "zxing-cpp-simd.wasm",
47
- "available": false,
48
- "sha256": null,
49
- "bytes": 0,
50
- "simd": true
51
- }
52
- },
53
- "licenseFiles": [
54
- "LICENSE",
55
- "LICENSE-ZXING-WASM",
56
- "LICENSE-ZXING-CPP",
57
- "NOTICE"
58
- ]
59
- }
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "distribution": {
4
+ "name": "zxing-wasm",
5
+ "version": "3.1.1",
6
+ "sourceCommit": "41d92eadda2a556dff9a044ff29fd3e41e70c657",
7
+ "integrity": "sha512-g0sPJBIubO6zLcJh1jftLPIN6xziaqLsvLgtpGKwDrEhyXXqla3E3yjFrznlr78UHIOMzbJPi0HDWKs/KgaB7A=="
8
+ },
9
+ "upstream": {
10
+ "name": "zxing-cpp",
11
+ "commit": "6c2961d2a9ea4bc4e4ae8f37b1497299f04dd861",
12
+ "license": "Apache-2.0"
13
+ },
14
+ "toolchain": {
15
+ "emscripten": "5.0.4",
16
+ "cmakeMinimum": "3.14",
17
+ "canonicalEnvironment": "ubuntu-24.04 x64, Node 24, Emscripten 5.0.4"
18
+ },
19
+ "build": {
20
+ "timestampPolicy": "No Scanly timestamp is embedded; the pinned distribution artifact is byte-for-byte verified.",
21
+ "readerOnly": true,
22
+ "flags": [
23
+ "-O3",
24
+ "-fexceptions",
25
+ "-s DISABLE_EXCEPTION_CATCHING=0",
26
+ "-s ENVIRONMENT=web,worker",
27
+ "-s FILESYSTEM=0",
28
+ "-s EXPORT_ES6=1",
29
+ "-s MODULARIZE=1",
30
+ "-s DYNAMIC_EXECUTION=0",
31
+ "-s ALLOW_MEMORY_GROWTH=1",
32
+ "-s STACK_SIZE=5242880"
33
+ ],
34
+ "sourceHash": "774330bd90c99c99f2fa710508cc64ed0f3aac97cd8795e575d5384aadd93bdc",
35
+ "glueSha256": "fb8ec6dfa03c4d1c32925b53db7b40da9acaf978a3f704bb8ceb2ba7f6edf33a"
36
+ },
37
+ "assets": {
38
+ "standard": {
39
+ "file": "zxing-cpp.wasm",
40
+ "available": true,
41
+ "sha256": "6a858c01e076bab3a1bd413e4f2cf5e5e45f819a0d9441d83c66993bc48ed38f",
42
+ "bytes": 1065634,
43
+ "simd": false
44
+ },
45
+ "simd": {
46
+ "file": "zxing-cpp-simd.wasm",
47
+ "available": false,
48
+ "sha256": null,
49
+ "bytes": 0,
50
+ "simd": true
51
+ }
52
+ },
53
+ "licenseFiles": [
54
+ "LICENSE",
55
+ "LICENSE-ZXING-WASM",
56
+ "LICENSE-ZXING-CPP",
57
+ "NOTICE"
58
+ ]
59
+ }