@fluffylabs/anan-as 1.0.0 → 1.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 +21 -18
- package/build/debug-inline.js +16 -0
- package/build/debug-raw-inline.js +16 -0
- package/build/debug-raw.d.ts +9 -1
- package/build/debug-raw.js +6 -2
- package/build/debug-raw.wasm +0 -0
- package/build/debug.d.ts +9 -1
- package/build/debug.js +7 -2
- package/build/debug.wasm +0 -0
- package/build/release-inline.js +16 -0
- package/build/release-mini-inline.js +16 -0
- package/build/release-mini.d.ts +9 -1
- package/build/release-mini.js +7 -2
- package/build/release-mini.wasm +0 -0
- package/build/release-stub-inline.js +16 -0
- package/build/release-stub.d.ts +218 -0
- package/build/{release-raw.js → release-stub.js} +46 -3
- package/build/release-stub.wasm +0 -0
- package/build/release.d.ts +9 -1
- package/build/release.js +7 -2
- package/build/release.wasm +0 -0
- package/build/test-inline.js +16 -0
- package/package.json +34 -14
- package/build/release-raw.d.ts +0 -210
- package/build/release-raw.wasm +0 -0
- package/build/tests.d.ts +0 -24
- package/build/tests.js +0 -104
- package/build/tests.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
# 🍍 anan-as
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AssemblyScript implementation of the JAM PVM (64-bit).
|
|
4
4
|
|
|
5
5
|
[Demo](https://todr.me/anan-as)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Todo
|
|
8
8
|
|
|
9
9
|
- [x] Memory
|
|
10
10
|
- [x] [JAM tests](https://github.com/w3f/jamtestvectors/pull/3) compatibility
|
|
11
11
|
- [x] 64-bit & new instructions ([GrayPaper v0.5.0](https://graypaper.fluffylabs.dev))
|
|
12
12
|
- [x] GP 0.5.4 compatibility (ZBB extensions)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Why?
|
|
15
15
|
|
|
16
|
-
- [
|
|
16
|
+
- [Pineapples](https://en.wikipedia.org/wiki/Ananas) are cool.
|
|
17
17
|
- [JAM](https://graypaper.com/) is promising.
|
|
18
18
|
- [PVM](https://github.com/paritytech/polkavm) is neat.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
### Useful where?
|
|
20
|
+
## Useful where?
|
|
22
21
|
|
|
23
22
|
- Potentially as an alternative implementation for [`typeberry`](https://github.com/fluffylabs).
|
|
24
23
|
- To test out the [PVM debugger](https://pvm.fluffylabs.dev).
|
|
@@ -54,9 +53,11 @@ ananAs.__collect();
|
|
|
54
53
|
|
|
55
54
|
```
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
## Raw Bindings
|
|
58
57
|
|
|
59
|
-
Raw bindings give you direct access to WebAssembly exports
|
|
58
|
+
Raw bindings give you direct access to WebAssembly exports
|
|
59
|
+
without the JavaScript wrapper layer.
|
|
60
|
+
This is useful for instantiating multiple instances or when you need more control:
|
|
60
61
|
|
|
61
62
|
```javascript
|
|
62
63
|
// Raw bindings
|
|
@@ -74,9 +75,10 @@ const ananAs = await instantiate(module);
|
|
|
74
75
|
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
## Version Tags
|
|
78
79
|
|
|
79
|
-
When installing the package, you can choose between stable releases
|
|
80
|
+
When installing the package, you can choose between stable releases
|
|
81
|
+
and bleeding-edge builds:
|
|
80
82
|
|
|
81
83
|
```bash
|
|
82
84
|
# Latest stable release
|
|
@@ -89,24 +91,25 @@ npm install @fluffylabs/anan-as@next
|
|
|
89
91
|
## Building
|
|
90
92
|
|
|
91
93
|
To download the dependencies:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
|
|
95
|
+
```cmd
|
|
96
|
+
npm ci
|
|
94
97
|
```
|
|
95
98
|
|
|
96
99
|
To build the WASM modules (in `./build/{release,debug}.wasm`):
|
|
97
100
|
|
|
98
|
-
```
|
|
99
|
-
|
|
101
|
+
```cmd
|
|
102
|
+
npm run build
|
|
100
103
|
```
|
|
101
104
|
|
|
102
105
|
To run the example in the browser at [http://localhost:3000](http://localhost:3000).
|
|
103
106
|
|
|
104
|
-
```
|
|
105
|
-
|
|
107
|
+
```cmd
|
|
108
|
+
npm run web
|
|
106
109
|
```
|
|
107
110
|
|
|
108
111
|
To run JSON test vectors.
|
|
109
112
|
|
|
110
|
-
```
|
|
111
|
-
|
|
113
|
+
```cmd
|
|
114
|
+
npm start ./path/to/tests/*.json
|
|
112
115
|
```
|