@onda-lang/wasm-compiler 0.9.2 → 0.9.3

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
@@ -219,7 +219,8 @@ onda-wasm compile ./main.onda --root . --output ./dist/main.wasm
219
219
  ```
220
220
 
221
221
  The command recursively collects `.onda` files below `--root`, compiles the requested entry, and
222
- writes an integrity-associated `main.wasm` plus `main.onda.json` descriptor. Use `--help` for code
222
+ writes an integrity-associated `main.wasm` plus `main.onda.json` descriptor. Arithmetic is strict
223
+ by default. Use `--fast-math` to enable Binaryen's relaxed rewrites. Use `--help` for code
223
224
  generation and output options.
224
225
 
225
226
  ## Artifact hosting
@@ -2,7 +2,7 @@
2
2
 
3
3
  The packaged compiler includes the following third-party components:
4
4
 
5
- - Binaryen.js 130.0.0, licensed under Apache-2.0. The complete license is shipped as
5
+ - Binaryen.js 132.0.0, licensed under Apache-2.0. The complete license is shipped as
6
6
  `dist/licenses/BINARYEN-LICENSE.txt`.
7
7
  - The Onda WebAssembly math kernel uses `libm` 0.2.16, licensed under MIT. The complete license is
8
8
  shipped as `dist/licenses/LIBM-LICENSE.txt`.
package/bin/onda-wasm.js CHANGED
@@ -23,6 +23,7 @@ Options:
23
23
  --optimize-level <0..4> Binaryen optimization level (default: 4)
24
24
  --shrink-level <0..2> Binaryen shrink level (default: 0)
25
25
  --fast-math Enable relaxed floating-point rewrites
26
+ --strict-math Preserve strict floating-point arithmetic (default)
26
27
  --no-simd Disable WebAssembly SIMD code generation
27
28
  --wat-out <file> Also write WebAssembly text format
28
29
  --help, -h Show this help
@@ -156,6 +157,9 @@ function parseCompileArguments(args) {
156
157
  case "--fast-math":
157
158
  result.fastMath = true;
158
159
  break;
160
+ case "--strict-math":
161
+ result.fastMath = false;
162
+ break;
159
163
  case "--no-simd":
160
164
  result.simd = false;
161
165
  break;