wesl-rs-web 0.0.0 → 0.6.0-overloads.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.
@@ -20,9 +20,6 @@ export interface CompileOptions {
20
20
  lower: boolean;
21
21
  validate: boolean;
22
22
  naga: boolean;
23
- lazy: boolean;
24
- keep?: string[] | undefined;
25
- keep_main: boolean;
26
23
  mangle_main: boolean;
27
24
  features: { [name: string]: Feature };
28
25
  features_default?: Feature;
@@ -23,64 +23,64 @@ export function run(args) {
23
23
  function __wbg_get_imports() {
24
24
  const import0 = {
25
25
  __proto__: null,
26
- __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
26
+ __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
27
27
  const ret = Error(getStringFromWasm0(arg0, arg1));
28
28
  return ret;
29
29
  },
30
- __wbg_Number_9a4e0ecb0fa16705: function(arg0) {
30
+ __wbg_Number_14af1003b8dd5ead: function(arg0) {
31
31
  const ret = Number(arg0);
32
32
  return ret;
33
33
  },
34
- __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
34
+ __wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c: function(arg0, arg1) {
35
35
  const v = arg1;
36
36
  const ret = typeof(v) === 'bigint' ? v : undefined;
37
37
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
38
38
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
39
39
  },
40
- __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
40
+ __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
41
41
  const v = arg0;
42
42
  const ret = typeof(v) === 'boolean' ? v : undefined;
43
43
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
44
44
  },
45
- __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
45
+ __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
46
46
  const ret = debugString(arg1);
47
47
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
48
48
  const len1 = WASM_VECTOR_LEN;
49
49
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
50
50
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
51
51
  },
52
- __wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
52
+ __wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
53
53
  const ret = arg0 in arg1;
54
54
  return ret;
55
55
  },
56
- __wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
56
+ __wbg___wbindgen_is_bigint_b123553bed3bb382: function(arg0) {
57
57
  const ret = typeof(arg0) === 'bigint';
58
58
  return ret;
59
59
  },
60
- __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
60
+ __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
61
61
  const ret = typeof(arg0) === 'function';
62
62
  return ret;
63
63
  },
64
- __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
64
+ __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
65
65
  const val = arg0;
66
66
  const ret = typeof(val) === 'object' && val !== null;
67
67
  return ret;
68
68
  },
69
- __wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
69
+ __wbg___wbindgen_jsval_eq_02babf21faa37971: function(arg0, arg1) {
70
70
  const ret = arg0 === arg1;
71
71
  return ret;
72
72
  },
73
- __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
73
+ __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
74
74
  const ret = arg0 == arg1;
75
75
  return ret;
76
76
  },
77
- __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
77
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
78
78
  const obj = arg1;
79
79
  const ret = typeof(obj) === 'number' ? obj : undefined;
80
80
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
81
81
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
82
82
  },
83
- __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
83
+ __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
84
84
  const obj = arg1;
85
85
  const ret = typeof(obj) === 'string' ? obj : undefined;
86
86
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -88,38 +88,38 @@ function __wbg_get_imports() {
88
88
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
89
89
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
90
90
  },
91
- __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
91
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
92
92
  throw new Error(getStringFromWasm0(arg0, arg1));
93
93
  },
94
- __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
94
+ __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
95
95
  const ret = arg0.call(arg1);
96
96
  return ret;
97
97
  }, arguments); },
98
- __wbg_done_89b2b13e91a60321: function(arg0) {
98
+ __wbg_done_b41a1d26cdb37fb6: function(arg0) {
99
99
  const ret = arg0.done;
100
100
  return ret;
101
101
  },
102
- __wbg_entries_015dc610cd81ede0: function(arg0) {
102
+ __wbg_entries_fb6397112b1de25f: function(arg0) {
103
103
  const ret = Object.entries(arg0);
104
104
  return ret;
105
105
  },
106
- __wbg_from_13e323c65fc8f464: function(arg0) {
106
+ __wbg_from_296ca31f8d0f1c52: function(arg0) {
107
107
  const ret = Array.from(arg0);
108
108
  return ret;
109
109
  },
110
- __wbg_get_507a50627bffa49b: function(arg0, arg1) {
111
- const ret = arg0[arg1 >>> 0];
112
- return ret;
113
- },
114
- __wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
110
+ __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
115
111
  const ret = Reflect.get(arg0, arg1);
116
112
  return ret;
117
113
  }, arguments); },
118
- __wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
114
+ __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
119
115
  const ret = arg0[arg1 >>> 0];
120
116
  return ret;
121
117
  },
122
- __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
118
+ __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
119
+ const ret = arg0[arg1 >>> 0];
120
+ return ret;
121
+ },
122
+ __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
123
123
  let result;
124
124
  try {
125
125
  result = arg0 instanceof ArrayBuffer;
@@ -129,7 +129,7 @@ function __wbg_get_imports() {
129
129
  const ret = result;
130
130
  return ret;
131
131
  },
132
- __wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
132
+ __wbg_instanceof_Map_b2611749102d7ba3: function(arg0) {
133
133
  let result;
134
134
  try {
135
135
  result = arg0 instanceof Map;
@@ -139,7 +139,7 @@ function __wbg_get_imports() {
139
139
  const ret = result;
140
140
  return ret;
141
141
  },
142
- __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
142
+ __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
143
143
  let result;
144
144
  try {
145
145
  result = arg0 instanceof Uint8Array;
@@ -149,80 +149,80 @@ function __wbg_get_imports() {
149
149
  const ret = result;
150
150
  return ret;
151
151
  },
152
- __wbg_isArray_0677c962b281d01a: function(arg0) {
152
+ __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
153
153
  const ret = Array.isArray(arg0);
154
154
  return ret;
155
155
  },
156
- __wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
156
+ __wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
157
157
  const ret = Number.isSafeInteger(arg0);
158
158
  return ret;
159
159
  },
160
- __wbg_iterator_6f722e4a93058b71: function() {
160
+ __wbg_iterator_e3c31c892080e444: function() {
161
161
  const ret = Symbol.iterator;
162
162
  return ret;
163
163
  },
164
- __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
164
+ __wbg_length_7f3c00c40364105e: function(arg0) {
165
165
  const ret = arg0.length;
166
166
  return ret;
167
167
  },
168
- __wbg_length_370319915dc99107: function(arg0) {
168
+ __wbg_length_d4bdea10311bd9cf: function(arg0) {
169
169
  const ret = arg0.length;
170
170
  return ret;
171
171
  },
172
- __wbg_new_32b398fb48b6d94a: function() {
173
- const ret = new Array();
174
- return ret;
175
- },
176
- __wbg_new_cd45aabdf6073e84: function(arg0) {
172
+ __wbg_new_1dbf7428bba60a42: function(arg0) {
177
173
  const ret = new Uint8Array(arg0);
178
174
  return ret;
179
175
  },
180
- __wbg_new_da52cf8fe3429cb2: function() {
176
+ __wbg_new_617a8cdb8bb1130e: function() {
181
177
  const ret = new Object();
182
178
  return ret;
183
179
  },
184
- __wbg_next_6dbf2c0ac8cde20f: function(arg0) {
180
+ __wbg_new_ee2291f50781bf1d: function() {
181
+ const ret = new Array();
182
+ return ret;
183
+ },
184
+ __wbg_next_33784799010f1bbe: function(arg0) {
185
185
  const ret = arg0.next;
186
186
  return ret;
187
187
  },
188
- __wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
188
+ __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
189
189
  const ret = arg0.next();
190
190
  return ret;
191
191
  }, arguments); },
192
- __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
192
+ __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
193
193
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
194
194
  },
195
195
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
196
196
  arg0[arg1] = arg2;
197
197
  },
198
- __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
198
+ __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
199
199
  arg0[arg1 >>> 0] = arg2;
200
200
  },
201
- __wbg_value_a5d5488a9589444a: function(arg0) {
201
+ __wbg_value_f3c585ee8f5ba40c: function(arg0) {
202
202
  const ret = arg0.value;
203
203
  return ret;
204
204
  },
205
- __wbindgen_cast_0000000000000001: function(arg0) {
205
+ __wbindgen_generic_0000000000000001: function(arg0) {
206
206
  // Cast intrinsic for `F64 -> Externref`.
207
207
  const ret = arg0;
208
208
  return ret;
209
209
  },
210
- __wbindgen_cast_0000000000000002: function(arg0) {
210
+ __wbindgen_generic_0000000000000002: function(arg0) {
211
211
  // Cast intrinsic for `I64 -> Externref`.
212
212
  const ret = arg0;
213
213
  return ret;
214
214
  },
215
- __wbindgen_cast_0000000000000003: function(arg0, arg1) {
215
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
216
216
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
217
217
  const ret = getArrayU8FromWasm0(arg0, arg1);
218
218
  return ret;
219
219
  },
220
- __wbindgen_cast_0000000000000004: function(arg0, arg1) {
220
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
221
221
  // Cast intrinsic for `Ref(String) -> Externref`.
222
222
  const ret = getStringFromWasm0(arg0, arg1);
223
223
  return ret;
224
224
  },
225
- __wbindgen_cast_0000000000000005: function(arg0) {
225
+ __wbindgen_generic_0000000000000005: function(arg0) {
226
226
  // Cast intrinsic for `U64 -> Externref`.
227
227
  const ret = BigInt.asUintN(64, arg0);
228
228
  return ret;
@@ -437,11 +437,15 @@ function __wbg_finalize_init(instance, module) {
437
437
 
438
438
  async function __wbg_load(module, imports) {
439
439
  if (typeof Response === 'function' && module instanceof Response) {
440
+ if (!module.ok) {
441
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
442
+ }
443
+
440
444
  if (typeof WebAssembly.instantiateStreaming === 'function') {
441
445
  try {
442
446
  return await WebAssembly.instantiateStreaming(module, imports);
443
447
  } catch (e) {
444
- const validResponse = module.ok && expectedResponseType(module.type);
448
+ const validResponse = expectedResponseType(module.type);
445
449
 
446
450
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
447
451
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wesl-rs-web",
3
- "version": "0.0.0",
3
+ "version": "0.6.0-overloads.0",
4
4
  "description": "wesl-rs compiler in WebAssembly",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {