@hazae41/stdbob 0.1.4 → 0.1.6

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.
@@ -8,10 +8,11 @@ name: release
8
8
  jobs:
9
9
  compare:
10
10
  name: compare
11
- runs-on: ubuntu-24.04
11
+ runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v6
13
+ - run: "sleep 5m"
14
+ - uses: actions/checkout@v7
15
+ - uses: actions/setup-node@v7
15
16
  with:
16
17
  node-version: latest
17
18
  - run: "npm ci && npm run prepack"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/stdbob",
4
- "version": "0.1.4",
4
+ "version": "0.1.6",
5
5
  "description": "Standard libraries for Bobine WebAssembly VM",
6
6
  "repository": "github:hazae41/stdbob",
7
7
  "author": "hazae41",
@@ -1,5 +1,4 @@
1
1
  import { textref } from "../texts/mod"
2
- import { wrapref } from "../wraps/mod"
3
2
 
4
3
  export type blobref = externref
5
4
 
@@ -109,10 +108,10 @@ export namespace blobs {
109
108
  export declare function encode<T>(value: T): blobref
110
109
 
111
110
  /**
112
- * Decode the given blob into a value of type T (assuming it was encoded from a value of type T) in a in a wrapref or null if it failed
111
+ * Decode the given blob into a value of type T (assuming it was encoded from a value of type T)
113
112
  */
114
113
  // @ts-ignore: decorator
115
114
  @external("blobs", "decode")
116
- export declare function decode(blob: blobref): wrapref
115
+ export declare function decode<T>(blob: blobref): T
117
116
 
118
117
  }
@@ -23,7 +23,7 @@ export namespace modules {
23
23
  export declare function load(module: textref): blobref
24
24
 
25
25
  /**
26
- * Call the given method of the given module with the given parameters then return the result in a wrapref or null if it failed
26
+ * Call the given method of the given module with the given parameters then return the result in a wrapref
27
27
  */
28
28
  // @ts-ignore: decorator
29
29
  @external("modules", "call")
@@ -1,20 +1,22 @@
1
+ import { wrapref } from "../wraps/mod";
2
+
1
3
  /**
2
- * Convert between externrefs and local i32 indices (for use in data structures)
4
+ * Convert between values and local i32 indices (for use in data structures)
3
5
  */
4
6
  export namespace pointers {
5
7
 
6
8
  /**
7
- * Convert an externref to an i32 index
9
+ * Convert a value to an i32 index
8
10
  */
9
11
  // @ts-ignore: decorator
10
12
  @external("pointers", "numerize")
11
- export declare function numerize(ref: externref): i32
13
+ export declare function numerize<T>(value: T): i32
12
14
 
13
15
  /**
14
- * Convert an i32 index back to an externref
16
+ * Convert an i32 index back to a value in a wrapref or null if not found
15
17
  */
16
18
  // @ts-ignore: decorator
17
19
  @external("pointers", "denumerize")
18
- export declare function denumerize(index: i32): externref
20
+ export declare function denumerize(index: i32): wrapref
19
21
 
20
22
  }
@@ -85,7 +85,7 @@ export namespace tuples {
85
85
  export declare function length(tuple: tupleref): i32
86
86
 
87
87
  /**
88
- * Get the value at the given index in the given tuple into a wrapref or null if not found
88
+ * Get the value at the given index in the given tuple in a wrapref or null if not found
89
89
  */
90
90
  // @ts-ignore: decorator
91
91
  @external("tuples", "get")