@yodaos-pkg/aix 0.6.0 → 0.7.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 +16 -9
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/pkg/README.md +16 -9
- package/pkg/aix_web.d.ts +13 -11
- package/pkg/aix_web.js +85 -160
- package/pkg/aix_web_bg.wasm +0 -0
- package/pkg/aix_web_bg.wasm.d.ts +13 -11
- package/pkg/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,11 +30,11 @@ async function fromFile(file: File) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Using the
|
|
33
|
+
## Using the Package Lab
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The official browser lab now lives in the docs site at `/play`.
|
|
36
36
|
|
|
37
|
-
If you are developing inside this repository, install dependencies in `
|
|
37
|
+
If you are developing inside this repository, install dependencies in `crates/aix-web` first:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npm install
|
|
@@ -46,28 +46,35 @@ npm install
|
|
|
46
46
|
npm run build
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the
|
|
49
|
+
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the docs-integrated Package Lab loads.
|
|
50
50
|
|
|
51
|
-
2.
|
|
51
|
+
2. Install the docs dependencies:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd ../../docs
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Start the docs site:
|
|
52
59
|
|
|
53
60
|
```bash
|
|
54
61
|
npm run dev
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
4. Open the local VitePress URL shown in the terminal, then navigate to `/play`, usually:
|
|
58
65
|
|
|
59
66
|
```text
|
|
60
|
-
http://localhost:5173
|
|
67
|
+
http://localhost:5173/aix/play
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
5. Upload an `.aix` file in the page to inspect:
|
|
64
71
|
|
|
65
72
|
- package title and version
|
|
66
73
|
- parsed `pages`
|
|
67
74
|
- generated OpenAI-compatible `tools`
|
|
68
75
|
- package file list and raw file contents
|
|
69
76
|
|
|
70
|
-
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package.
|
|
77
|
+
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package inside the official docs experience.
|
|
71
78
|
|
|
72
79
|
## API Reference
|
|
73
80
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/pkg/README.md
CHANGED
|
@@ -30,11 +30,11 @@ async function fromFile(file: File) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Using the
|
|
33
|
+
## Using the Package Lab
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The official browser lab now lives in the docs site at `/play`.
|
|
36
36
|
|
|
37
|
-
If you are developing inside this repository, install dependencies in `
|
|
37
|
+
If you are developing inside this repository, install dependencies in `crates/aix-web` first:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npm install
|
|
@@ -46,28 +46,35 @@ npm install
|
|
|
46
46
|
npm run build
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the
|
|
49
|
+
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the docs-integrated Package Lab loads.
|
|
50
50
|
|
|
51
|
-
2.
|
|
51
|
+
2. Install the docs dependencies:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd ../../docs
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Start the docs site:
|
|
52
59
|
|
|
53
60
|
```bash
|
|
54
61
|
npm run dev
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
4. Open the local VitePress URL shown in the terminal, then navigate to `/play`, usually:
|
|
58
65
|
|
|
59
66
|
```text
|
|
60
|
-
http://localhost:5173
|
|
67
|
+
http://localhost:5173/aix/play
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
5. Upload an `.aix` file in the page to inspect:
|
|
64
71
|
|
|
65
72
|
- package title and version
|
|
66
73
|
- parsed `pages`
|
|
67
74
|
- generated OpenAI-compatible `tools`
|
|
68
75
|
- package file list and raw file contents
|
|
69
76
|
|
|
70
|
-
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package.
|
|
77
|
+
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package inside the official docs experience.
|
|
71
78
|
|
|
72
79
|
## API Reference
|
|
73
80
|
|
package/pkg/aix_web.d.ts
CHANGED
|
@@ -18,17 +18,19 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
18
18
|
export interface InitOutput {
|
|
19
19
|
readonly memory: WebAssembly.Memory;
|
|
20
20
|
readonly __wbg_aixreaderwasm_free: (a: number, b: number) => void;
|
|
21
|
-
readonly aixreaderwasm_get_pages: (a: number
|
|
22
|
-
readonly aixreaderwasm_get_title: (a: number
|
|
23
|
-
readonly aixreaderwasm_get_tools: (a: number
|
|
24
|
-
readonly aixreaderwasm_get_version: (a: number
|
|
25
|
-
readonly aixreaderwasm_list: (a: number
|
|
26
|
-
readonly aixreaderwasm_new: (a: number, b: number
|
|
27
|
-
readonly aixreaderwasm_read_file: (a: number, b: number, c: number,
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
21
|
+
readonly aixreaderwasm_get_pages: (a: number) => [number, number, number];
|
|
22
|
+
readonly aixreaderwasm_get_title: (a: number) => [number, number];
|
|
23
|
+
readonly aixreaderwasm_get_tools: (a: number) => [number, number, number];
|
|
24
|
+
readonly aixreaderwasm_get_version: (a: number) => [number, number];
|
|
25
|
+
readonly aixreaderwasm_list: (a: number) => [number, number, number];
|
|
26
|
+
readonly aixreaderwasm_new: (a: number, b: number) => [number, number, number];
|
|
27
|
+
readonly aixreaderwasm_read_file: (a: number, b: number, c: number) => [number, number, number, number];
|
|
28
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
29
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
30
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
31
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
32
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
33
|
+
readonly __wbindgen_start: () => void;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/pkg/aix_web.js
CHANGED
|
@@ -15,215 +15,161 @@ export class AixReaderWasm {
|
|
|
15
15
|
* @returns {any}
|
|
16
16
|
*/
|
|
17
17
|
get_pages() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
22
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
23
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
24
|
-
if (r2) {
|
|
25
|
-
throw takeObject(r1);
|
|
26
|
-
}
|
|
27
|
-
return takeObject(r0);
|
|
28
|
-
} finally {
|
|
29
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
18
|
+
const ret = wasm.aixreaderwasm_get_pages(this.__wbg_ptr);
|
|
19
|
+
if (ret[2]) {
|
|
20
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
30
21
|
}
|
|
22
|
+
return takeFromExternrefTable0(ret[0]);
|
|
31
23
|
}
|
|
32
24
|
/**
|
|
33
25
|
* @returns {string | undefined}
|
|
34
26
|
*/
|
|
35
27
|
get_title() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let v1;
|
|
42
|
-
if (r0 !== 0) {
|
|
43
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
44
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
45
|
-
}
|
|
46
|
-
return v1;
|
|
47
|
-
} finally {
|
|
48
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
28
|
+
const ret = wasm.aixreaderwasm_get_title(this.__wbg_ptr);
|
|
29
|
+
let v1;
|
|
30
|
+
if (ret[0] !== 0) {
|
|
31
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
32
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
49
33
|
}
|
|
34
|
+
return v1;
|
|
50
35
|
}
|
|
51
36
|
/**
|
|
52
37
|
* @returns {any}
|
|
53
38
|
*/
|
|
54
39
|
get_tools() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
59
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
60
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
61
|
-
if (r2) {
|
|
62
|
-
throw takeObject(r1);
|
|
63
|
-
}
|
|
64
|
-
return takeObject(r0);
|
|
65
|
-
} finally {
|
|
66
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
40
|
+
const ret = wasm.aixreaderwasm_get_tools(this.__wbg_ptr);
|
|
41
|
+
if (ret[2]) {
|
|
42
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
67
43
|
}
|
|
44
|
+
return takeFromExternrefTable0(ret[0]);
|
|
68
45
|
}
|
|
69
46
|
/**
|
|
70
47
|
* @returns {string | undefined}
|
|
71
48
|
*/
|
|
72
49
|
get_version() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
let v1;
|
|
79
|
-
if (r0 !== 0) {
|
|
80
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
81
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
82
|
-
}
|
|
83
|
-
return v1;
|
|
84
|
-
} finally {
|
|
85
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
50
|
+
const ret = wasm.aixreaderwasm_get_version(this.__wbg_ptr);
|
|
51
|
+
let v1;
|
|
52
|
+
if (ret[0] !== 0) {
|
|
53
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
54
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
86
55
|
}
|
|
56
|
+
return v1;
|
|
87
57
|
}
|
|
88
58
|
/**
|
|
89
59
|
* @returns {any}
|
|
90
60
|
*/
|
|
91
61
|
list() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
96
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
97
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
98
|
-
if (r2) {
|
|
99
|
-
throw takeObject(r1);
|
|
100
|
-
}
|
|
101
|
-
return takeObject(r0);
|
|
102
|
-
} finally {
|
|
103
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
62
|
+
const ret = wasm.aixreaderwasm_list(this.__wbg_ptr);
|
|
63
|
+
if (ret[2]) {
|
|
64
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
104
65
|
}
|
|
66
|
+
return takeFromExternrefTable0(ret[0]);
|
|
105
67
|
}
|
|
106
68
|
/**
|
|
107
69
|
* @param {Uint8Array} data
|
|
108
70
|
*/
|
|
109
71
|
constructor(data) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
116
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
117
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
118
|
-
if (r2) {
|
|
119
|
-
throw takeObject(r1);
|
|
120
|
-
}
|
|
121
|
-
this.__wbg_ptr = r0 >>> 0;
|
|
122
|
-
AixReaderWasmFinalization.register(this, this.__wbg_ptr, this);
|
|
123
|
-
return this;
|
|
124
|
-
} finally {
|
|
125
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
72
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
73
|
+
const len0 = WASM_VECTOR_LEN;
|
|
74
|
+
const ret = wasm.aixreaderwasm_new(ptr0, len0);
|
|
75
|
+
if (ret[2]) {
|
|
76
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
126
77
|
}
|
|
78
|
+
this.__wbg_ptr = ret[0];
|
|
79
|
+
AixReaderWasmFinalization.register(this, this.__wbg_ptr, this);
|
|
80
|
+
return this;
|
|
127
81
|
}
|
|
128
82
|
/**
|
|
129
83
|
* @param {string} name
|
|
130
84
|
* @returns {Uint8Array}
|
|
131
85
|
*/
|
|
132
86
|
read_file(name) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
139
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
140
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
141
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
142
|
-
if (r3) {
|
|
143
|
-
throw takeObject(r2);
|
|
144
|
-
}
|
|
145
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
146
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
147
|
-
return v2;
|
|
148
|
-
} finally {
|
|
149
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
87
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
88
|
+
const len0 = WASM_VECTOR_LEN;
|
|
89
|
+
const ret = wasm.aixreaderwasm_read_file(this.__wbg_ptr, ptr0, len0);
|
|
90
|
+
if (ret[3]) {
|
|
91
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
150
92
|
}
|
|
93
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
94
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
95
|
+
return v2;
|
|
151
96
|
}
|
|
152
97
|
}
|
|
153
98
|
if (Symbol.dispose) AixReaderWasm.prototype[Symbol.dispose] = AixReaderWasm.prototype.free;
|
|
154
|
-
|
|
155
99
|
function __wbg_get_imports() {
|
|
156
100
|
const import0 = {
|
|
157
101
|
__proto__: null,
|
|
158
|
-
|
|
102
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
159
103
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
160
|
-
return
|
|
104
|
+
return ret;
|
|
161
105
|
},
|
|
162
|
-
|
|
163
|
-
const ret = String(
|
|
164
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
106
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
107
|
+
const ret = String(arg1);
|
|
108
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
165
109
|
const len1 = WASM_VECTOR_LEN;
|
|
166
110
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
167
111
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
168
112
|
},
|
|
169
|
-
|
|
170
|
-
const ret = typeof(
|
|
113
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
114
|
+
const ret = typeof(arg0) === 'string';
|
|
171
115
|
return ret;
|
|
172
116
|
},
|
|
173
|
-
|
|
117
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
174
118
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
175
119
|
},
|
|
176
|
-
|
|
177
|
-
const ret = new Object();
|
|
178
|
-
return addHeapObject(ret);
|
|
179
|
-
},
|
|
180
|
-
__wbg_new_3eb36ae241fe6f44: function() {
|
|
120
|
+
__wbg_new_32b398fb48b6d94a: function() {
|
|
181
121
|
const ret = new Array();
|
|
182
|
-
return
|
|
122
|
+
return ret;
|
|
183
123
|
},
|
|
184
|
-
|
|
124
|
+
__wbg_new_7796ffc7ed656783: function() {
|
|
185
125
|
const ret = new Map();
|
|
186
|
-
return
|
|
126
|
+
return ret;
|
|
187
127
|
},
|
|
188
|
-
|
|
189
|
-
const ret =
|
|
190
|
-
return
|
|
128
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
129
|
+
const ret = new Object();
|
|
130
|
+
return ret;
|
|
191
131
|
},
|
|
192
|
-
|
|
193
|
-
|
|
132
|
+
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
133
|
+
const ret = arg0.set(arg1, arg2);
|
|
134
|
+
return ret;
|
|
194
135
|
},
|
|
195
|
-
|
|
196
|
-
|
|
136
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
137
|
+
arg0[arg1] = arg2;
|
|
197
138
|
},
|
|
198
|
-
|
|
139
|
+
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
140
|
+
arg0[arg1 >>> 0] = arg2;
|
|
141
|
+
},
|
|
142
|
+
__wbg_warn_faa1de0d37661523: function(arg0, arg1) {
|
|
199
143
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
200
144
|
},
|
|
201
145
|
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
202
146
|
// Cast intrinsic for `F64 -> Externref`.
|
|
203
147
|
const ret = arg0;
|
|
204
|
-
return
|
|
148
|
+
return ret;
|
|
205
149
|
},
|
|
206
150
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
207
151
|
// Cast intrinsic for `I64 -> Externref`.
|
|
208
152
|
const ret = arg0;
|
|
209
|
-
return
|
|
153
|
+
return ret;
|
|
210
154
|
},
|
|
211
155
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
212
156
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
213
157
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
214
|
-
return
|
|
158
|
+
return ret;
|
|
215
159
|
},
|
|
216
160
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
217
161
|
// Cast intrinsic for `U64 -> Externref`.
|
|
218
162
|
const ret = BigInt.asUintN(64, arg0);
|
|
219
|
-
return
|
|
220
|
-
},
|
|
221
|
-
__wbindgen_object_clone_ref: function(arg0) {
|
|
222
|
-
const ret = getObject(arg0);
|
|
223
|
-
return addHeapObject(ret);
|
|
163
|
+
return ret;
|
|
224
164
|
},
|
|
225
|
-
|
|
226
|
-
|
|
165
|
+
__wbindgen_init_externref_table: function() {
|
|
166
|
+
const table = wasm.__wbindgen_externrefs;
|
|
167
|
+
const offset = table.grow(4);
|
|
168
|
+
table.set(0, undefined);
|
|
169
|
+
table.set(offset + 0, undefined);
|
|
170
|
+
table.set(offset + 1, null);
|
|
171
|
+
table.set(offset + 2, true);
|
|
172
|
+
table.set(offset + 3, false);
|
|
227
173
|
},
|
|
228
174
|
};
|
|
229
175
|
return {
|
|
@@ -234,22 +180,7 @@ function __wbg_get_imports() {
|
|
|
234
180
|
|
|
235
181
|
const AixReaderWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
236
182
|
? { register: () => {}, unregister: () => {} }
|
|
237
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_aixreaderwasm_free(ptr
|
|
238
|
-
|
|
239
|
-
function addHeapObject(obj) {
|
|
240
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
241
|
-
const idx = heap_next;
|
|
242
|
-
heap_next = heap[idx];
|
|
243
|
-
|
|
244
|
-
heap[idx] = obj;
|
|
245
|
-
return idx;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
function dropObject(idx) {
|
|
249
|
-
if (idx < 132) return;
|
|
250
|
-
heap[idx] = heap_next;
|
|
251
|
-
heap_next = idx;
|
|
252
|
-
}
|
|
183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_aixreaderwasm_free(ptr, 1));
|
|
253
184
|
|
|
254
185
|
function getArrayU8FromWasm0(ptr, len) {
|
|
255
186
|
ptr = ptr >>> 0;
|
|
@@ -265,8 +196,7 @@ function getDataViewMemory0() {
|
|
|
265
196
|
}
|
|
266
197
|
|
|
267
198
|
function getStringFromWasm0(ptr, len) {
|
|
268
|
-
|
|
269
|
-
return decodeText(ptr, len);
|
|
199
|
+
return decodeText(ptr >>> 0, len);
|
|
270
200
|
}
|
|
271
201
|
|
|
272
202
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -277,13 +207,6 @@ function getUint8ArrayMemory0() {
|
|
|
277
207
|
return cachedUint8ArrayMemory0;
|
|
278
208
|
}
|
|
279
209
|
|
|
280
|
-
function getObject(idx) { return heap[idx]; }
|
|
281
|
-
|
|
282
|
-
let heap = new Array(128).fill(undefined);
|
|
283
|
-
heap.push(undefined, null, true, false);
|
|
284
|
-
|
|
285
|
-
let heap_next = heap.length;
|
|
286
|
-
|
|
287
210
|
function passArray8ToWasm0(arg, malloc) {
|
|
288
211
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
289
212
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -328,10 +251,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
328
251
|
return ptr;
|
|
329
252
|
}
|
|
330
253
|
|
|
331
|
-
function
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
return
|
|
254
|
+
function takeFromExternrefTable0(idx) {
|
|
255
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
256
|
+
wasm.__externref_table_dealloc(idx);
|
|
257
|
+
return value;
|
|
335
258
|
}
|
|
336
259
|
|
|
337
260
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
@@ -363,12 +286,14 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
363
286
|
|
|
364
287
|
let WASM_VECTOR_LEN = 0;
|
|
365
288
|
|
|
366
|
-
let wasmModule, wasm;
|
|
289
|
+
let wasmModule, wasmInstance, wasm;
|
|
367
290
|
function __wbg_finalize_init(instance, module) {
|
|
291
|
+
wasmInstance = instance;
|
|
368
292
|
wasm = instance.exports;
|
|
369
293
|
wasmModule = module;
|
|
370
294
|
cachedDataViewMemory0 = null;
|
|
371
295
|
cachedUint8ArrayMemory0 = null;
|
|
296
|
+
wasm.__wbindgen_start();
|
|
372
297
|
return wasm;
|
|
373
298
|
}
|
|
374
299
|
|
package/pkg/aix_web_bg.wasm
CHANGED
|
Binary file
|
package/pkg/aix_web_bg.wasm.d.ts
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_aixreaderwasm_free: (a: number, b: number) => void;
|
|
5
|
-
export const aixreaderwasm_get_pages: (a: number
|
|
6
|
-
export const aixreaderwasm_get_title: (a: number
|
|
7
|
-
export const aixreaderwasm_get_tools: (a: number
|
|
8
|
-
export const aixreaderwasm_get_version: (a: number
|
|
9
|
-
export const aixreaderwasm_list: (a: number
|
|
10
|
-
export const aixreaderwasm_new: (a: number, b: number
|
|
11
|
-
export const aixreaderwasm_read_file: (a: number, b: number, c: number,
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
5
|
+
export const aixreaderwasm_get_pages: (a: number) => [number, number, number];
|
|
6
|
+
export const aixreaderwasm_get_title: (a: number) => [number, number];
|
|
7
|
+
export const aixreaderwasm_get_tools: (a: number) => [number, number, number];
|
|
8
|
+
export const aixreaderwasm_get_version: (a: number) => [number, number];
|
|
9
|
+
export const aixreaderwasm_list: (a: number) => [number, number, number];
|
|
10
|
+
export const aixreaderwasm_new: (a: number, b: number) => [number, number, number];
|
|
11
|
+
export const aixreaderwasm_read_file: (a: number, b: number, c: number) => [number, number, number, number];
|
|
12
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
13
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
14
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
15
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
16
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
17
|
+
export const __wbindgen_start: () => void;
|
package/pkg/package.json
CHANGED