@astral-sh/ruff-wasm-web 0.13.0 → 0.13.2
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 +2 -2
- package/package.json +1 -1
- package/ruff_wasm.d.ts +7 -2
- package/ruff_wasm.js +108 -98
- package/ruff_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ There are multiple versions for the different wasm-pack targets. See [here](http
|
|
|
19
19
|
This example uses the wasm-pack web target and is known to work with Vite.
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
|
-
import init, { Workspace, type Diagnostic } from '@astral-sh/ruff-
|
|
22
|
+
import init, { Workspace, type Diagnostic, PositionEncoding } from '@astral-sh/ruff-wasm-web';
|
|
23
23
|
|
|
24
24
|
const exampleDocument = `print('hello'); print("world")`
|
|
25
25
|
|
|
@@ -42,7 +42,7 @@ const workspace = new Workspace({
|
|
|
42
42
|
'F'
|
|
43
43
|
],
|
|
44
44
|
},
|
|
45
|
-
});
|
|
45
|
+
}, PositionEncoding.UTF16);
|
|
46
46
|
|
|
47
47
|
// Will contain 1 diagnostic code for E702: Multiple statements on one line
|
|
48
48
|
const diagnostics: Diagnostic[] = workspace.check(exampleDocument);
|
package/package.json
CHANGED
package/ruff_wasm.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function run(): void;
|
|
4
|
+
export enum PositionEncoding {
|
|
5
|
+
Utf8 = 0,
|
|
6
|
+
Utf16 = 1,
|
|
7
|
+
Utf32 = 2,
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
export interface Diagnostic {
|
|
6
11
|
code: string | null;
|
|
@@ -33,7 +38,7 @@ export interface Diagnostic {
|
|
|
33
38
|
export class Workspace {
|
|
34
39
|
free(): void;
|
|
35
40
|
static version(): string;
|
|
36
|
-
constructor(options: any);
|
|
41
|
+
constructor(options: any, position_encoding: PositionEncoding);
|
|
37
42
|
static defaultSettings(): any;
|
|
38
43
|
check(contents: string): any;
|
|
39
44
|
format(contents: string): string;
|
|
@@ -53,7 +58,7 @@ export interface InitOutput {
|
|
|
53
58
|
readonly run: () => void;
|
|
54
59
|
readonly __wbg_workspace_free: (a: number, b: number) => void;
|
|
55
60
|
readonly workspace_version: () => [number, number];
|
|
56
|
-
readonly workspace_new: (a: any) => [number, number, number];
|
|
61
|
+
readonly workspace_new: (a: any, b: number) => [number, number, number];
|
|
57
62
|
readonly workspace_defaultSettings: () => [number, number, number];
|
|
58
63
|
readonly workspace_check: (a: number, b: number, c: number) => [number, number, number];
|
|
59
64
|
readonly workspace_format: (a: number, b: number, c: number) => [number, number, number, number];
|
package/ruff_wasm.js
CHANGED
|
@@ -110,6 +110,11 @@ function handleError(f, args) {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
114
|
+
ptr = ptr >>> 0;
|
|
115
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
116
|
+
}
|
|
117
|
+
|
|
113
118
|
function isLikeNone(x) {
|
|
114
119
|
return x === undefined || x === null;
|
|
115
120
|
}
|
|
@@ -188,6 +193,14 @@ function takeFromExternrefTable0(idx) {
|
|
|
188
193
|
wasm.__externref_table_dealloc(idx);
|
|
189
194
|
return value;
|
|
190
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* @enum {0 | 1 | 2}
|
|
198
|
+
*/
|
|
199
|
+
export const PositionEncoding = Object.freeze({
|
|
200
|
+
Utf8: 0, "0": "Utf8",
|
|
201
|
+
Utf16: 1, "1": "Utf16",
|
|
202
|
+
Utf32: 2, "2": "Utf32",
|
|
203
|
+
});
|
|
191
204
|
|
|
192
205
|
const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
193
206
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -223,9 +236,10 @@ export class Workspace {
|
|
|
223
236
|
}
|
|
224
237
|
/**
|
|
225
238
|
* @param {any} options
|
|
239
|
+
* @param {PositionEncoding} position_encoding
|
|
226
240
|
*/
|
|
227
|
-
constructor(options) {
|
|
228
|
-
const ret = wasm.workspace_new(options);
|
|
241
|
+
constructor(options, position_encoding) {
|
|
242
|
+
const ret = wasm.workspace_new(options, position_encoding);
|
|
229
243
|
if (ret[2]) {
|
|
230
244
|
throw takeFromExternrefTable0(ret[1]);
|
|
231
245
|
}
|
|
@@ -417,10 +431,14 @@ async function __wbg_load(module, imports) {
|
|
|
417
431
|
function __wbg_get_imports() {
|
|
418
432
|
const imports = {};
|
|
419
433
|
imports.wbg = {};
|
|
420
|
-
imports.wbg.
|
|
434
|
+
imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
|
|
421
435
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
422
436
|
return ret;
|
|
423
437
|
};
|
|
438
|
+
imports.wbg.__wbg_Number_577a493fc95ea223 = function(arg0) {
|
|
439
|
+
const ret = Number(arg0);
|
|
440
|
+
return ret;
|
|
441
|
+
};
|
|
424
442
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
425
443
|
const ret = String(arg1);
|
|
426
444
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -428,30 +446,26 @@ function __wbg_get_imports() {
|
|
|
428
446
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
429
447
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
430
448
|
};
|
|
431
|
-
imports.wbg.
|
|
432
|
-
const ret = arg0.buffer;
|
|
433
|
-
return ret;
|
|
434
|
-
};
|
|
435
|
-
imports.wbg.__wbg_call_fbe8be8bf6436ce5 = function() { return handleError(function (arg0, arg1) {
|
|
449
|
+
imports.wbg.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
|
|
436
450
|
const ret = arg0.call(arg1);
|
|
437
451
|
return ret;
|
|
438
452
|
}, arguments) };
|
|
439
|
-
imports.wbg.
|
|
453
|
+
imports.wbg.__wbg_codePointAt_12acefc1bed285e5 = function(arg0, arg1) {
|
|
440
454
|
const ret = arg0.codePointAt(arg1 >>> 0);
|
|
441
455
|
return ret;
|
|
442
456
|
};
|
|
443
|
-
imports.wbg.
|
|
457
|
+
imports.wbg.__wbg_debug_9a166dc82b4ba6a6 = function(arg0) {
|
|
444
458
|
console.debug(arg0);
|
|
445
459
|
};
|
|
446
|
-
imports.wbg.
|
|
460
|
+
imports.wbg.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
|
|
447
461
|
const ret = arg0.done;
|
|
448
462
|
return ret;
|
|
449
463
|
};
|
|
450
|
-
imports.wbg.
|
|
464
|
+
imports.wbg.__wbg_entries_17f7acbc2d691c0d = function(arg0) {
|
|
451
465
|
const ret = Object.entries(arg0);
|
|
452
466
|
return ret;
|
|
453
467
|
};
|
|
454
|
-
imports.wbg.
|
|
468
|
+
imports.wbg.__wbg_error_41f0589870426ea4 = function(arg0) {
|
|
455
469
|
console.error(arg0);
|
|
456
470
|
};
|
|
457
471
|
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
@@ -465,15 +479,15 @@ function __wbg_get_imports() {
|
|
|
465
479
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
466
480
|
}
|
|
467
481
|
};
|
|
468
|
-
imports.wbg.
|
|
482
|
+
imports.wbg.__wbg_fromCodePoint_258371ef302abf8a = function() { return handleError(function (arg0) {
|
|
469
483
|
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
470
484
|
return ret;
|
|
471
485
|
}, arguments) };
|
|
472
|
-
imports.wbg.
|
|
486
|
+
imports.wbg.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
|
|
473
487
|
const ret = Reflect.get(arg0, arg1);
|
|
474
488
|
return ret;
|
|
475
489
|
}, arguments) };
|
|
476
|
-
imports.wbg.
|
|
490
|
+
imports.wbg.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
|
|
477
491
|
const ret = arg0[arg1 >>> 0];
|
|
478
492
|
return ret;
|
|
479
493
|
};
|
|
@@ -481,10 +495,10 @@ function __wbg_get_imports() {
|
|
|
481
495
|
const ret = arg0[arg1];
|
|
482
496
|
return ret;
|
|
483
497
|
};
|
|
484
|
-
imports.wbg.
|
|
498
|
+
imports.wbg.__wbg_info_ed6e390d09c09062 = function(arg0) {
|
|
485
499
|
console.info(arg0);
|
|
486
500
|
};
|
|
487
|
-
imports.wbg.
|
|
501
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
|
|
488
502
|
let result;
|
|
489
503
|
try {
|
|
490
504
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -494,7 +508,7 @@ function __wbg_get_imports() {
|
|
|
494
508
|
const ret = result;
|
|
495
509
|
return ret;
|
|
496
510
|
};
|
|
497
|
-
imports.wbg.
|
|
511
|
+
imports.wbg.__wbg_instanceof_Map_dd89a82d76d1b25f = function(arg0) {
|
|
498
512
|
let result;
|
|
499
513
|
try {
|
|
500
514
|
result = arg0 instanceof Map;
|
|
@@ -504,7 +518,7 @@ function __wbg_get_imports() {
|
|
|
504
518
|
const ret = result;
|
|
505
519
|
return ret;
|
|
506
520
|
};
|
|
507
|
-
imports.wbg.
|
|
521
|
+
imports.wbg.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
|
|
508
522
|
let result;
|
|
509
523
|
try {
|
|
510
524
|
result = arg0 instanceof Uint8Array;
|
|
@@ -514,77 +528,77 @@ function __wbg_get_imports() {
|
|
|
514
528
|
const ret = result;
|
|
515
529
|
return ret;
|
|
516
530
|
};
|
|
517
|
-
imports.wbg.
|
|
531
|
+
imports.wbg.__wbg_isArray_bc2498eba6fcb71f = function(arg0) {
|
|
518
532
|
const ret = Array.isArray(arg0);
|
|
519
533
|
return ret;
|
|
520
534
|
};
|
|
521
|
-
imports.wbg.
|
|
535
|
+
imports.wbg.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
|
|
522
536
|
const ret = Number.isSafeInteger(arg0);
|
|
523
537
|
return ret;
|
|
524
538
|
};
|
|
525
|
-
imports.wbg.
|
|
539
|
+
imports.wbg.__wbg_iterator_96378c3c9a17347c = function() {
|
|
526
540
|
const ret = Symbol.iterator;
|
|
527
541
|
return ret;
|
|
528
542
|
};
|
|
529
|
-
imports.wbg.
|
|
543
|
+
imports.wbg.__wbg_length_246fa1f85a0dea5b = function(arg0) {
|
|
530
544
|
const ret = arg0.length;
|
|
531
545
|
return ret;
|
|
532
546
|
};
|
|
533
|
-
imports.wbg.
|
|
547
|
+
imports.wbg.__wbg_length_7bca5263dfc69dd1 = function(arg0) {
|
|
534
548
|
const ret = arg0.length;
|
|
535
549
|
return ret;
|
|
536
550
|
};
|
|
537
|
-
imports.wbg.
|
|
551
|
+
imports.wbg.__wbg_length_904c0910ed998bf3 = function(arg0) {
|
|
538
552
|
const ret = arg0.length;
|
|
539
553
|
return ret;
|
|
540
554
|
};
|
|
541
|
-
imports.wbg.
|
|
555
|
+
imports.wbg.__wbg_log_f3c04200b995730f = function(arg0) {
|
|
542
556
|
console.log(arg0);
|
|
543
557
|
};
|
|
544
|
-
imports.wbg.
|
|
558
|
+
imports.wbg.__wbg_new_1930cbb8d9ffc31b = function() {
|
|
545
559
|
const ret = new Object();
|
|
546
560
|
return ret;
|
|
547
561
|
};
|
|
548
|
-
imports.wbg.
|
|
549
|
-
const ret = new
|
|
550
|
-
return ret;
|
|
551
|
-
};
|
|
552
|
-
imports.wbg.__wbg_new_58353953ad2097cc = function() {
|
|
553
|
-
const ret = new Array();
|
|
562
|
+
imports.wbg.__wbg_new_56407f99198feff7 = function() {
|
|
563
|
+
const ret = new Map();
|
|
554
564
|
return ret;
|
|
555
565
|
};
|
|
556
566
|
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
557
567
|
const ret = new Error();
|
|
558
568
|
return ret;
|
|
559
569
|
};
|
|
560
|
-
imports.wbg.
|
|
561
|
-
const ret = new
|
|
570
|
+
imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
|
|
571
|
+
const ret = new Uint8Array(arg0);
|
|
562
572
|
return ret;
|
|
563
573
|
};
|
|
564
|
-
imports.wbg.
|
|
565
|
-
const ret = new
|
|
574
|
+
imports.wbg.__wbg_new_97ddeb994a38bb69 = function(arg0, arg1) {
|
|
575
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
566
576
|
return ret;
|
|
567
577
|
};
|
|
568
|
-
imports.wbg.
|
|
569
|
-
const ret =
|
|
578
|
+
imports.wbg.__wbg_new_e969dc3f68d25093 = function() {
|
|
579
|
+
const ret = new Array();
|
|
570
580
|
return ret;
|
|
571
581
|
};
|
|
572
|
-
imports.wbg.
|
|
582
|
+
imports.wbg.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
|
|
573
583
|
const ret = arg0.next();
|
|
574
584
|
return ret;
|
|
575
585
|
}, arguments) };
|
|
576
|
-
imports.wbg.
|
|
577
|
-
|
|
586
|
+
imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
|
|
587
|
+
const ret = arg0.next;
|
|
588
|
+
return ret;
|
|
578
589
|
};
|
|
579
|
-
imports.wbg.
|
|
580
|
-
arg0
|
|
590
|
+
imports.wbg.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
|
|
591
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
581
592
|
};
|
|
582
|
-
imports.wbg.
|
|
593
|
+
imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
|
|
583
594
|
const ret = arg0.set(arg1, arg2);
|
|
584
595
|
return ret;
|
|
585
596
|
};
|
|
586
|
-
imports.wbg.
|
|
587
|
-
arg0
|
|
597
|
+
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
598
|
+
arg0[arg1] = arg2;
|
|
599
|
+
};
|
|
600
|
+
imports.wbg.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
|
|
601
|
+
arg0[arg1 >>> 0] = arg2;
|
|
588
602
|
};
|
|
589
603
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
590
604
|
const ret = arg1.stack;
|
|
@@ -593,101 +607,71 @@ function __wbg_get_imports() {
|
|
|
593
607
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
594
608
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
595
609
|
};
|
|
596
|
-
imports.wbg.
|
|
610
|
+
imports.wbg.__wbg_value_09d0b4eaab48b91d = function(arg0) {
|
|
597
611
|
const ret = arg0.value;
|
|
598
612
|
return ret;
|
|
599
613
|
};
|
|
600
|
-
imports.wbg.
|
|
614
|
+
imports.wbg.__wbg_warn_07ef1f61c52799fb = function(arg0) {
|
|
601
615
|
console.warn(arg0);
|
|
602
616
|
};
|
|
603
|
-
imports.wbg.
|
|
604
|
-
const ret = +arg0;
|
|
605
|
-
return ret;
|
|
606
|
-
};
|
|
607
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
608
|
-
const ret = arg0;
|
|
609
|
-
return ret;
|
|
610
|
-
};
|
|
611
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
612
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
613
|
-
return ret;
|
|
614
|
-
};
|
|
615
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
617
|
+
imports.wbg.__wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e = function(arg0, arg1) {
|
|
616
618
|
const v = arg1;
|
|
617
619
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
618
620
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
619
621
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
620
622
|
};
|
|
621
|
-
imports.wbg.
|
|
623
|
+
imports.wbg.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
|
|
622
624
|
const v = arg0;
|
|
623
|
-
const ret = typeof(v) === 'boolean' ?
|
|
624
|
-
return ret;
|
|
625
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
626
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
625
627
|
};
|
|
626
|
-
imports.wbg.
|
|
628
|
+
imports.wbg.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
|
|
627
629
|
const ret = debugString(arg1);
|
|
628
630
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
631
|
const len1 = WASM_VECTOR_LEN;
|
|
630
632
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
631
633
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
632
634
|
};
|
|
633
|
-
imports.wbg.
|
|
635
|
+
imports.wbg.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
|
|
634
636
|
const ret = arg0 in arg1;
|
|
635
637
|
return ret;
|
|
636
638
|
};
|
|
637
|
-
imports.wbg.
|
|
638
|
-
const table = wasm.__wbindgen_export_4;
|
|
639
|
-
const offset = table.grow(4);
|
|
640
|
-
table.set(0, undefined);
|
|
641
|
-
table.set(offset + 0, undefined);
|
|
642
|
-
table.set(offset + 1, null);
|
|
643
|
-
table.set(offset + 2, true);
|
|
644
|
-
table.set(offset + 3, false);
|
|
645
|
-
;
|
|
646
|
-
};
|
|
647
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
639
|
+
imports.wbg.__wbg_wbindgenisbigint_7d76a1ca6454e439 = function(arg0) {
|
|
648
640
|
const ret = typeof(arg0) === 'bigint';
|
|
649
641
|
return ret;
|
|
650
642
|
};
|
|
651
|
-
imports.wbg.
|
|
643
|
+
imports.wbg.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
|
|
652
644
|
const ret = typeof(arg0) === 'function';
|
|
653
645
|
return ret;
|
|
654
646
|
};
|
|
655
|
-
imports.wbg.
|
|
647
|
+
imports.wbg.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
|
|
656
648
|
const val = arg0;
|
|
657
649
|
const ret = typeof(val) === 'object' && val !== null;
|
|
658
650
|
return ret;
|
|
659
651
|
};
|
|
660
|
-
imports.wbg.
|
|
652
|
+
imports.wbg.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
|
|
661
653
|
const ret = typeof(arg0) === 'string';
|
|
662
654
|
return ret;
|
|
663
655
|
};
|
|
664
|
-
imports.wbg.
|
|
656
|
+
imports.wbg.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
|
|
665
657
|
const ret = arg0 === undefined;
|
|
666
658
|
return ret;
|
|
667
659
|
};
|
|
668
|
-
imports.wbg.
|
|
660
|
+
imports.wbg.__wbg_wbindgenjsvaleq_f27272c0a890df7f = function(arg0, arg1) {
|
|
669
661
|
const ret = arg0 === arg1;
|
|
670
662
|
return ret;
|
|
671
663
|
};
|
|
672
|
-
imports.wbg.
|
|
664
|
+
imports.wbg.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
|
|
673
665
|
const ret = arg0 == arg1;
|
|
674
666
|
return ret;
|
|
675
667
|
};
|
|
676
|
-
imports.wbg.
|
|
677
|
-
const ret = wasm.memory;
|
|
678
|
-
return ret;
|
|
679
|
-
};
|
|
680
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
668
|
+
imports.wbg.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
|
|
681
669
|
const obj = arg1;
|
|
682
670
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
683
671
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
684
672
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
685
673
|
};
|
|
686
|
-
imports.wbg.
|
|
687
|
-
const ret = arg0;
|
|
688
|
-
return ret;
|
|
689
|
-
};
|
|
690
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
674
|
+
imports.wbg.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
|
|
691
675
|
const obj = arg1;
|
|
692
676
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
693
677
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -695,12 +679,38 @@ function __wbg_get_imports() {
|
|
|
695
679
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
696
680
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
697
681
|
};
|
|
698
|
-
imports.wbg.
|
|
682
|
+
imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
|
|
683
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
684
|
+
};
|
|
685
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
686
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
699
687
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
700
688
|
return ret;
|
|
701
689
|
};
|
|
702
|
-
imports.wbg.
|
|
703
|
-
|
|
690
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
691
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
692
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
693
|
+
return ret;
|
|
694
|
+
};
|
|
695
|
+
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
696
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
697
|
+
const ret = arg0;
|
|
698
|
+
return ret;
|
|
699
|
+
};
|
|
700
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
701
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
702
|
+
const ret = arg0;
|
|
703
|
+
return ret;
|
|
704
|
+
};
|
|
705
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
706
|
+
const table = wasm.__wbindgen_export_4;
|
|
707
|
+
const offset = table.grow(4);
|
|
708
|
+
table.set(0, undefined);
|
|
709
|
+
table.set(offset + 0, undefined);
|
|
710
|
+
table.set(offset + 1, null);
|
|
711
|
+
table.set(offset + 2, true);
|
|
712
|
+
table.set(offset + 3, false);
|
|
713
|
+
;
|
|
704
714
|
};
|
|
705
715
|
|
|
706
716
|
return imports;
|
package/ruff_wasm_bg.wasm
CHANGED
|
Binary file
|