@holoscript/wasm 6.0.3 → 6.1.0
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 +18 -7
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@ High-performance HoloScript parser compiled to WebAssembly.
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **10x faster parsing** compared to JavaScript implementation
|
|
8
7
|
- **Browser-native** - runs directly in the browser without server
|
|
9
8
|
- **Small footprint** - <500KB gzipped
|
|
10
9
|
- **Full HoloScript support** - all language features including Brittney AI constructs
|
|
@@ -137,13 +136,25 @@ npm run test
|
|
|
137
136
|
|
|
138
137
|
## Performance
|
|
139
138
|
|
|
140
|
-
|
|
139
|
+
**The WASM parser is currently SLOWER than the JS parser at canonical
|
|
140
|
+
fixture sizes** due to JS↔linear-memory string marshalling overhead.
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
|
146
|
-
|
|
|
142
|
+
Measured on i7-11800H / Node v22.20.0 / `wasm-pack` release build
|
|
143
|
+
(`wasm-opt -O3 --enable-bulk-memory --enable-nontrapping-float-to-int`):
|
|
144
|
+
|
|
145
|
+
| Fixture | WASM vs JS speedup |
|
|
146
|
+
| ------------------ | ------------------------ |
|
|
147
|
+
| small (32 lines) | 0.66-0.74x (JS faster) |
|
|
148
|
+
| medium (78 lines) | 0.64-0.67x (JS faster) |
|
|
149
|
+
| large (142 lines) | 0.64-0.66x (JS faster) |
|
|
150
|
+
|
|
151
|
+
Native Rust (no WASM boundary) is ~1.3-1.4x faster than JS, so the
|
|
152
|
+
parser logic itself is competitive — the boundary is the bottleneck.
|
|
153
|
+
|
|
154
|
+
Use WASM only when the V8 JIT is not available (mobile WebViews,
|
|
155
|
+
edge workers, sandboxed runtimes).
|
|
156
|
+
|
|
157
|
+
Full methodology and raw data: `research/2026-04-19_todo-r2-wasm-bench-results.md`.
|
|
147
158
|
|
|
148
159
|
## Browser Compatibility
|
|
149
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holoscript/wasm",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "HoloScript parser compiled to WebAssembly for high-performance browser execution",
|
|
5
5
|
"main": "pkg/holoscript_wasm.js",
|
|
6
6
|
"types": "pkg/holoscript_wasm.d.ts",
|
|
@@ -28,10 +28,11 @@
|
|
|
28
28
|
"url": "https://github.com/brianonbased-dev/HoloScript/issues"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "
|
|
31
|
+
"build": "node scripts/build-wasm.mjs",
|
|
32
32
|
"build:nodejs": "wasm-pack build --target nodejs --out-dir pkg-node",
|
|
33
33
|
"build:bundler": "wasm-pack build --target bundler --out-dir pkg-bundler",
|
|
34
34
|
"test": "cargo test || echo 'cargo not installed, skipping WASM tests'",
|
|
35
|
-
"clean": "rm -rf pkg pkg-node pkg-bundler target"
|
|
35
|
+
"clean": "rm -rf pkg pkg-node pkg-bundler target",
|
|
36
|
+
"test:coverage": "vitest run --coverage"
|
|
36
37
|
}
|
|
37
38
|
}
|