2017-12-30 05:11:58 +01:00
|
|
|
PSON decoder in WebAssembly
|
|
|
|
===========================
|
|
|
|
|
|
|
|
An [AssemblyScript](http://assemblyscript.org) example. Decodes a [PSON](https://github.com/dcodeIO/PSON) encoded buffer.
|
|
|
|
|
|
|
|
Instructions
|
|
|
|
------------
|
|
|
|
|
2018-02-19 19:16:16 +01:00
|
|
|
To build [assembly/pson.ts](./assembly/pson.ts) to an untouched and an optimized `.wasm` including their respective `.wat` representations, run:
|
2017-12-30 05:11:58 +01:00
|
|
|
|
|
|
|
```
|
2018-05-06 01:32:58 +02:00
|
|
|
$> npm run asbuild
|
2017-12-30 05:11:58 +01:00
|
|
|
```
|
|
|
|
|
2018-01-01 20:27:21 +01:00
|
|
|
Afterwards, to run the included [test](./tests/index.js):
|
2017-12-30 05:11:58 +01:00
|
|
|
|
|
|
|
```
|
2018-01-01 20:27:21 +01:00
|
|
|
$> npm install
|
2017-12-30 05:11:58 +01:00
|
|
|
$> npm test
|
|
|
|
```
|