ballistics-engine 0.33.3 → 0.33.4

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
@@ -760,6 +760,22 @@ Splitting the help text into per-command chunks costs the full build about 3 KB
760
760
  gzipped (35 `push_str` calls where there was one literal). That is the price of the table
761
761
  above; every configuration that drops a command is far ahead.
762
762
 
763
+ **The `.wasm` and the JS glue are a matched pair — replace both together.** `wasm-bindgen`
764
+ generates the glue to match one specific module, and trimming genuinely changes the module's
765
+ import list: dropping `wasm-monte-carlo` removes the last user of `rand`, so the slim `.wasm`
766
+ no longer imports `crypto.getRandomValues` and the slim glue no longer supplies it. Ship a
767
+ stale full `.wasm` against new slim glue and instantiation fails outright:
768
+
769
+ ```
770
+ LinkError: WebAssembly.Instance(): Import #4 "./ballistics_engine_bg.js"
771
+ "__wbg_getRandomValues_..." function import requires a callable
772
+ ```
773
+
774
+ The reverse pairing — slim `.wasm` with full glue — happens to load, because the extra import
775
+ simply goes unused. Do not rely on that: it is a coincidence of which imports differ today, not
776
+ a compatibility guarantee, and it will not hold for a different feature subset. Copy every file
777
+ `build-wasm.sh` emits, from the same run, and clear any bundler cache that may hold the old one.
778
+
763
779
  Removing a command does not change any number the remaining ones produce: the full-terminal
764
780
  build is byte-identical to an ungated build across every command, and `Calculator` output is
765
781
  byte-identical between the full and trajectory-only builds. A command compiled out reports
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Alex Jokela <email@tinycomputers.io>"
6
6
  ],
7
7
  "description": "High-performance ballistics trajectory engine with professional physics",
8
- "version": "0.33.3",
8
+ "version": "0.33.4",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",