watr 1.0.0 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "watr",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Ligth & fast WAT compiler",
5
5
  "main": "watr.js",
6
6
  "type": "module",
@@ -11,8 +11,12 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git+https://github.com/dy/watr.git"
14
+ "url": "git+https://github.com/audio-lab/watr.git"
15
15
  },
16
+ "files": [
17
+ "watr.js",
18
+ "watr.min.js"
19
+ ],
16
20
  "keywords": [
17
21
  "wat",
18
22
  "compiler",
@@ -21,9 +25,9 @@
21
25
  "author": "Dmitry Iv",
22
26
  "license": "ISC",
23
27
  "bugs": {
24
- "url": "https://github.com/dy/watr/issues"
28
+ "url": "https://github.com/audio-lab/watr/issues"
25
29
  },
26
- "homepage": "https://github.com/dy/watr#readme",
30
+ "homepage": "https://github.com/audio-lab/watr#readme",
27
31
  "devDependencies": {
28
32
  "rollup": "^2.70.1",
29
33
  "terser": "^5.12.1",
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # watr
1
+ # watr [![Test](https://github.com/audio-lab/watr/actions/workflows/test.js.yml/badge.svg)](https://github.com/audio-lab/watr/actions/workflows/test.js.yml)
2
2
 
3
3
  > Light & fast WAT compiler.
4
4
 
@@ -17,9 +17,9 @@ Performance (op/s) | 45000 | 2500 | 3100
17
17
 
18
18
    | Size (gzipped) | Performance (op/s)
19
19
  ---|---|---
20
- watr | 2.8 kb | 45,000
21
- wat-compiler | 6 kb | 2,500
22
- wabt | 300 kb | 3,100
20
+ watr | 3.8 kb | 1900
21
+ wat-compiler | 6 kb | 135
22
+ wabt | 300 kb | 250
23
23
 
24
24
  ## Usage
25
25
 
@@ -62,8 +62,9 @@ double(108) // 216
62
62
 
63
63
  ## Limitations
64
64
 
65
- Ambiguous syntax is intentionally prohibited in favor of explicit lispy structure.<br>
66
- Each instruction has prefix signature with parenthesized immediates and arguments.
65
+ Ambiguous syntax is prohibited in favor of explicit lispy structure.<br>
66
+ Each instruction must have prefix signature with parenthesized immediates and arguments.<br>
67
+ It may be supported, but discouraged.
67
68
 
68
69
  ```wast
69
70
  (func (result i32)
@@ -95,11 +96,16 @@ end
95
96
  )
96
97
  ```
97
98
 
98
- Numbers format limitation:
99
+ ```wast
100
+ (f32.const 0x1.fffffep+127) ;; ✘ floating HEX (not supported)
101
+ ```
102
+
103
+ ```wast
104
+ (global.set $pc (;(i32.const <new-pc>);)) ✘ default arguments must be explicit
105
+ ```
99
106
 
100
- * Int64 input format `0x7fffffffffffffff` is not supported (at the moment), only Int32.
101
- * Floating HEX like `0x1.fffffep+127` format is not supported.
102
- * Numeric placeholders `122_000.11_3_54E0_2_3` are not supported.
107
+ It may also miss some edge cases and nice error messages.
108
+ For good REPL experience better use wabt.
103
109
 
104
110
  <!--
105
111
  Main goal is to get very fluent with wasm text.