@hazae41/stdbob 0.0.2 → 0.0.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.
Files changed (2) hide show
  1. package/README.md +24 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -3,7 +3,29 @@
3
3
  Standard libraries for Bobine WebAssembly VM
4
4
 
5
5
  ```bash
6
- npm install @hazae41/immutable
6
+ npm install @hazae41/stdbob
7
7
  ```
8
8
 
9
- [**📦 NPM**](https://www.npmjs.com/package/@hazae41/stdbob)
9
+ [**📦 NPM**](https://www.npmjs.com/package/@hazae41/stdbob)
10
+
11
+ ## Usage
12
+
13
+ ### AssemblyScript
14
+
15
+ Just import the library from your AssemblyScript file
16
+
17
+ ```tsx
18
+ import { modules, blobref } from "@hazae41/stdbob"
19
+
20
+ export function main(): blobref {
21
+ return modules.self()
22
+ }
23
+ ```
24
+
25
+ And compile with `reference-types` enabled and `stub` runtime
26
+
27
+ ```bash
28
+ asc ./mod.ts -o ./mod.wasm --runtime stub --enable reference-types
29
+ ```
30
+
31
+ Then deploy the .wasm file to your Bobine VM
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/stdbob",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "Standard libraries for Bobine WebAssembly VM",
6
6
  "repository": "github:hazae41/stdbob",
7
7
  "author": "hazae41",
8
8
  "license": "MIT",
9
9
  "scripts": {
10
- "examine": "asc --noEmit ./src/bin.ts --enable reference-types"
10
+ "examine": "asc ./src/bin.ts -o ./out/bin.wasm --runtime stub --enable reference-types"
11
11
  },
12
12
  "devDependencies": {
13
13
  "assemblyscript": "^0.28.9"