@xyo-network/wasm 3.8.0 → 3.8.1

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.
@@ -1,2 +1,59 @@
1
- export * from './WasmSupport.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ declare const WasmFeatureDetectors: {
2
+ readonly bigInt: () => Promise<boolean>;
3
+ readonly bulkMemory: () => Promise<boolean>;
4
+ readonly exceptions: () => Promise<boolean>;
5
+ readonly extendedConst: () => Promise<boolean>;
6
+ readonly gc: () => Promise<boolean>;
7
+ readonly memory64: () => Promise<boolean>;
8
+ readonly multiValue: () => Promise<boolean>;
9
+ readonly mutableGlobals: () => Promise<boolean>;
10
+ readonly referenceTypes: () => {
11
+ new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
+ all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
+ race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
+ readonly prototype: Promise<any>;
17
+ reject<T = never>(reason?: any): Promise<T>;
18
+ resolve(): Promise<void>;
19
+ resolve<T>(value: T): Promise<Awaited<T>>;
20
+ resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
+ allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
+ allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
+ any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
+ any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
+ withResolvers<T>(): PromiseWithResolvers<T>;
26
+ readonly [Symbol.species]: PromiseConstructor;
27
+ };
28
+ readonly relaxedSimd: () => Promise<boolean>;
29
+ readonly saturatedFloatToInt: () => Promise<boolean>;
30
+ readonly signExtensions: () => Promise<boolean>;
31
+ readonly simd: () => Promise<boolean>;
32
+ readonly streamingCompilation: () => Promise<boolean>;
33
+ readonly tailCall: () => Promise<boolean>;
34
+ readonly threads: () => Promise<boolean>;
35
+ };
36
+ type WasmFeature = keyof typeof WasmFeatureDetectors;
37
+ declare class WasmSupport {
38
+ protected desiredFeatures: WasmFeature[];
39
+ private _allowWasm;
40
+ private _featureSupport;
41
+ private _forceWasm;
42
+ private _isInitialized;
43
+ private _isWasmFeatureSetSupported;
44
+ constructor(desiredFeatures: WasmFeature[]);
45
+ get allowWasm(): boolean;
46
+ set allowWasm(v: boolean);
47
+ get canUseWasm(): boolean;
48
+ get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
49
+ get forceWasm(): boolean;
50
+ set forceWasm(v: boolean);
51
+ get isDesiredFeatureSetSupported(): boolean;
52
+ get isInitialized(): boolean;
53
+ static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
54
+ featureCheck(features: WasmFeature[]): Promise<boolean>;
55
+ initialize(): Promise<void>;
56
+ protected detectDesiredFeatures(): Promise<void>;
57
+ }
58
+
59
+ export { type WasmFeature, WasmFeatureDetectors, WasmSupport };
@@ -1,2 +1,59 @@
1
- export * from './WasmSupport.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ declare const WasmFeatureDetectors: {
2
+ readonly bigInt: () => Promise<boolean>;
3
+ readonly bulkMemory: () => Promise<boolean>;
4
+ readonly exceptions: () => Promise<boolean>;
5
+ readonly extendedConst: () => Promise<boolean>;
6
+ readonly gc: () => Promise<boolean>;
7
+ readonly memory64: () => Promise<boolean>;
8
+ readonly multiValue: () => Promise<boolean>;
9
+ readonly mutableGlobals: () => Promise<boolean>;
10
+ readonly referenceTypes: () => {
11
+ new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
+ all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
+ race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
+ readonly prototype: Promise<any>;
17
+ reject<T = never>(reason?: any): Promise<T>;
18
+ resolve(): Promise<void>;
19
+ resolve<T>(value: T): Promise<Awaited<T>>;
20
+ resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
+ allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
+ allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
+ any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
+ any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
+ withResolvers<T>(): PromiseWithResolvers<T>;
26
+ readonly [Symbol.species]: PromiseConstructor;
27
+ };
28
+ readonly relaxedSimd: () => Promise<boolean>;
29
+ readonly saturatedFloatToInt: () => Promise<boolean>;
30
+ readonly signExtensions: () => Promise<boolean>;
31
+ readonly simd: () => Promise<boolean>;
32
+ readonly streamingCompilation: () => Promise<boolean>;
33
+ readonly tailCall: () => Promise<boolean>;
34
+ readonly threads: () => Promise<boolean>;
35
+ };
36
+ type WasmFeature = keyof typeof WasmFeatureDetectors;
37
+ declare class WasmSupport {
38
+ protected desiredFeatures: WasmFeature[];
39
+ private _allowWasm;
40
+ private _featureSupport;
41
+ private _forceWasm;
42
+ private _isInitialized;
43
+ private _isWasmFeatureSetSupported;
44
+ constructor(desiredFeatures: WasmFeature[]);
45
+ get allowWasm(): boolean;
46
+ set allowWasm(v: boolean);
47
+ get canUseWasm(): boolean;
48
+ get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
49
+ get forceWasm(): boolean;
50
+ set forceWasm(v: boolean);
51
+ get isDesiredFeatureSetSupported(): boolean;
52
+ get isInitialized(): boolean;
53
+ static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
54
+ featureCheck(features: WasmFeature[]): Promise<boolean>;
55
+ initialize(): Promise<void>;
56
+ protected detectDesiredFeatures(): Promise<void>;
57
+ }
58
+
59
+ export { type WasmFeature, WasmFeatureDetectors, WasmSupport };
@@ -1,2 +1,59 @@
1
- export * from './WasmSupport.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ declare const WasmFeatureDetectors: {
2
+ readonly bigInt: () => Promise<boolean>;
3
+ readonly bulkMemory: () => Promise<boolean>;
4
+ readonly exceptions: () => Promise<boolean>;
5
+ readonly extendedConst: () => Promise<boolean>;
6
+ readonly gc: () => Promise<boolean>;
7
+ readonly memory64: () => Promise<boolean>;
8
+ readonly multiValue: () => Promise<boolean>;
9
+ readonly mutableGlobals: () => Promise<boolean>;
10
+ readonly referenceTypes: () => {
11
+ new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
+ all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
+ race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
+ readonly prototype: Promise<any>;
17
+ reject<T = never>(reason?: any): Promise<T>;
18
+ resolve(): Promise<void>;
19
+ resolve<T>(value: T): Promise<Awaited<T>>;
20
+ resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
+ allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
+ allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
+ any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
+ any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
+ withResolvers<T>(): PromiseWithResolvers<T>;
26
+ readonly [Symbol.species]: PromiseConstructor;
27
+ };
28
+ readonly relaxedSimd: () => Promise<boolean>;
29
+ readonly saturatedFloatToInt: () => Promise<boolean>;
30
+ readonly signExtensions: () => Promise<boolean>;
31
+ readonly simd: () => Promise<boolean>;
32
+ readonly streamingCompilation: () => Promise<boolean>;
33
+ readonly tailCall: () => Promise<boolean>;
34
+ readonly threads: () => Promise<boolean>;
35
+ };
36
+ type WasmFeature = keyof typeof WasmFeatureDetectors;
37
+ declare class WasmSupport {
38
+ protected desiredFeatures: WasmFeature[];
39
+ private _allowWasm;
40
+ private _featureSupport;
41
+ private _forceWasm;
42
+ private _isInitialized;
43
+ private _isWasmFeatureSetSupported;
44
+ constructor(desiredFeatures: WasmFeature[]);
45
+ get allowWasm(): boolean;
46
+ set allowWasm(v: boolean);
47
+ get canUseWasm(): boolean;
48
+ get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
49
+ get forceWasm(): boolean;
50
+ set forceWasm(v: boolean);
51
+ get isDesiredFeatureSetSupported(): boolean;
52
+ get isInitialized(): boolean;
53
+ static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
54
+ featureCheck(features: WasmFeature[]): Promise<boolean>;
55
+ initialize(): Promise<void>;
56
+ protected detectDesiredFeatures(): Promise<void>;
57
+ }
58
+
59
+ export { type WasmFeature, WasmFeatureDetectors, WasmSupport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/wasm",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -32,11 +32,11 @@
32
32
  "wasm-feature-detect": "^1.8.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@xylabs/ts-scripts-yarn3": "^4.2.6",
36
- "@xylabs/tsconfig": "^4.2.6",
35
+ "@xylabs/ts-scripts-yarn3": "^5.0.22",
36
+ "@xylabs/tsconfig": "^5.0.22",
37
37
  "@xylabs/vitest-extended": "^4.5.1",
38
38
  "typescript": "^5.7.3",
39
- "vitest": "^3.0.4"
39
+ "vitest": "^3.0.5"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -1,115 +0,0 @@
1
- export declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{
22
- /**
23
- * Is Wasm allowed
24
- */
25
- - /**
26
- * Is Wasm allowed
27
- */readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
28
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
29
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
30
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
31
- withResolvers<T>(): PromiseWithResolvers<T>;
32
- readonly [Symbol.species]: PromiseConstructor;
33
- };
34
- readonly relaxedSimd: () => Promise<boolean>;
35
- readonly saturatedFloatToInt: () => Promise<boolean>;
36
- readonly signExtensions: () => Promise<boolean>;
37
- readonly simd: () => Promise<boolean>;
38
- readonly streamingCompilation: () => Promise<boolean>;
39
- readonly tailCall: () => Promise<boolean>;
40
- readonly threads: () => Promise<boolean>;
41
- };
42
- export type WasmFeature = keyof typeof WasmFeatureDetectors;
43
- export declare class WasmSupport {
44
- protected desiredFeatures: WasmFeature[];
45
- private _allowWasm;
46
- private _featureSupport;
47
- private _forceWasm;
48
- private _isInitialized;
49
- private _isWasmFeatureSetSupported;
50
- /**
51
- * Instance constructor for use where async instantiation
52
- * is not possible. Where possible, prefer the static
53
- * create method over use of this constructor directly
54
- * as no initialization (feature detection) is able to
55
- * be done here
56
- * @param desiredFeatures The desired feature set
57
- */
58
- constructor(desiredFeatures: WasmFeature[]);
59
- /**
60
- * Is Wasm allowed
61
- */
62
- get allowWasm(): boolean;
63
- /**
64
- * Whether or not to allow WASM usage
65
- */
66
- set allowWasm(v: boolean);
67
- /**
68
- * Whether or not Wasm should be used based on the desired
69
- * feature set, initialization state, or force-use settings
70
- */
71
- get canUseWasm(): boolean;
72
- /**
73
- * Returns a object containing a property for each desired wasm feature
74
- * with a boolean value indicating whether or not the feature is supported
75
- */
76
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
77
- /**
78
- * Force use of Wasm
79
- */
80
- get forceWasm(): boolean;
81
- /**
82
- * Whether or not to force Wasm usage
83
- */
84
- set forceWasm(v: boolean);
85
- /**
86
- * Whether or not Wasm is supported based
87
- * on the desired feature set
88
- */
89
- get isDesiredFeatureSetSupported(): boolean;
90
- /**
91
- * Whether or not Wasm detection has been run
92
- * for the desired feature set
93
- */
94
- get isInitialized(): boolean;
95
- /**
96
- * Static creation & async initialization for use where
97
- * async instantiation is possible
98
- * @param desiredFeatures The desired feature set
99
- * @returns An initialized instance of the class with detection
100
- * for the desired feature set
101
- */
102
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
103
- /**
104
- * Checks for specific wasm features
105
- * @param features The list of features to check for
106
- * @returns True if all the features are supported, false otherwise
107
- */
108
- featureCheck(features: WasmFeature[]): Promise<boolean>;
109
- /**
110
- * Does feature detection for the desired feature set
111
- */
112
- initialize(): Promise<void>;
113
- protected detectDesiredFeatures(): Promise<void>;
114
- }
115
- //# sourceMappingURL=WasmSupport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,oBAAoB;;;;;;;;;;iGAoCa,CAAC;;qEAoB7C,CAAD;;;;;;;;;QAlBC;;WAEG;QACH,CAHF,CAAE;;WAEG;;;;;;;;;;;;;;CAvBK,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,oBAAoB,CAAA;AAE3D,qBAAa,WAAW;IAeV,SAAS,CAAC,eAAe,EAAE,WAAW,EAAE;IAdpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,0BAA0B,CAAQ;IAE1C;;;;;;;OAOG;gBACmB,eAAe,EAAE,WAAW,EAAE;IAEpD;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CASxB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;;;;OAMG;WACU,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAMzE;;;;OAIG;IACG,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAMjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
@@ -1,115 +0,0 @@
1
- export declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{
22
- /**
23
- * Is Wasm allowed
24
- */
25
- - /**
26
- * Is Wasm allowed
27
- */readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
28
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
29
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
30
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
31
- withResolvers<T>(): PromiseWithResolvers<T>;
32
- readonly [Symbol.species]: PromiseConstructor;
33
- };
34
- readonly relaxedSimd: () => Promise<boolean>;
35
- readonly saturatedFloatToInt: () => Promise<boolean>;
36
- readonly signExtensions: () => Promise<boolean>;
37
- readonly simd: () => Promise<boolean>;
38
- readonly streamingCompilation: () => Promise<boolean>;
39
- readonly tailCall: () => Promise<boolean>;
40
- readonly threads: () => Promise<boolean>;
41
- };
42
- export type WasmFeature = keyof typeof WasmFeatureDetectors;
43
- export declare class WasmSupport {
44
- protected desiredFeatures: WasmFeature[];
45
- private _allowWasm;
46
- private _featureSupport;
47
- private _forceWasm;
48
- private _isInitialized;
49
- private _isWasmFeatureSetSupported;
50
- /**
51
- * Instance constructor for use where async instantiation
52
- * is not possible. Where possible, prefer the static
53
- * create method over use of this constructor directly
54
- * as no initialization (feature detection) is able to
55
- * be done here
56
- * @param desiredFeatures The desired feature set
57
- */
58
- constructor(desiredFeatures: WasmFeature[]);
59
- /**
60
- * Is Wasm allowed
61
- */
62
- get allowWasm(): boolean;
63
- /**
64
- * Whether or not to allow WASM usage
65
- */
66
- set allowWasm(v: boolean);
67
- /**
68
- * Whether or not Wasm should be used based on the desired
69
- * feature set, initialization state, or force-use settings
70
- */
71
- get canUseWasm(): boolean;
72
- /**
73
- * Returns a object containing a property for each desired wasm feature
74
- * with a boolean value indicating whether or not the feature is supported
75
- */
76
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
77
- /**
78
- * Force use of Wasm
79
- */
80
- get forceWasm(): boolean;
81
- /**
82
- * Whether or not to force Wasm usage
83
- */
84
- set forceWasm(v: boolean);
85
- /**
86
- * Whether or not Wasm is supported based
87
- * on the desired feature set
88
- */
89
- get isDesiredFeatureSetSupported(): boolean;
90
- /**
91
- * Whether or not Wasm detection has been run
92
- * for the desired feature set
93
- */
94
- get isInitialized(): boolean;
95
- /**
96
- * Static creation & async initialization for use where
97
- * async instantiation is possible
98
- * @param desiredFeatures The desired feature set
99
- * @returns An initialized instance of the class with detection
100
- * for the desired feature set
101
- */
102
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
103
- /**
104
- * Checks for specific wasm features
105
- * @param features The list of features to check for
106
- * @returns True if all the features are supported, false otherwise
107
- */
108
- featureCheck(features: WasmFeature[]): Promise<boolean>;
109
- /**
110
- * Does feature detection for the desired feature set
111
- */
112
- initialize(): Promise<void>;
113
- protected detectDesiredFeatures(): Promise<void>;
114
- }
115
- //# sourceMappingURL=WasmSupport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,oBAAoB;;;;;;;;;;iGAoCa,CAAC;;qEAoB7C,CAAD;;;;;;;;;QAlBC;;WAEG;QACH,CAHF,CAAE;;WAEG;;;;;;;;;;;;;;CAvBK,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,oBAAoB,CAAA;AAE3D,qBAAa,WAAW;IAeV,SAAS,CAAC,eAAe,EAAE,WAAW,EAAE;IAdpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,0BAA0B,CAAQ;IAE1C;;;;;;;OAOG;gBACmB,eAAe,EAAE,WAAW,EAAE;IAEpD;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CASxB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;;;;OAMG;WACU,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAMzE;;;;OAIG;IACG,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAMjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
@@ -1,115 +0,0 @@
1
- export declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{
22
- /**
23
- * Is Wasm allowed
24
- */
25
- - /**
26
- * Is Wasm allowed
27
- */readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
28
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
29
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
30
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
31
- withResolvers<T>(): PromiseWithResolvers<T>;
32
- readonly [Symbol.species]: PromiseConstructor;
33
- };
34
- readonly relaxedSimd: () => Promise<boolean>;
35
- readonly saturatedFloatToInt: () => Promise<boolean>;
36
- readonly signExtensions: () => Promise<boolean>;
37
- readonly simd: () => Promise<boolean>;
38
- readonly streamingCompilation: () => Promise<boolean>;
39
- readonly tailCall: () => Promise<boolean>;
40
- readonly threads: () => Promise<boolean>;
41
- };
42
- export type WasmFeature = keyof typeof WasmFeatureDetectors;
43
- export declare class WasmSupport {
44
- protected desiredFeatures: WasmFeature[];
45
- private _allowWasm;
46
- private _featureSupport;
47
- private _forceWasm;
48
- private _isInitialized;
49
- private _isWasmFeatureSetSupported;
50
- /**
51
- * Instance constructor for use where async instantiation
52
- * is not possible. Where possible, prefer the static
53
- * create method over use of this constructor directly
54
- * as no initialization (feature detection) is able to
55
- * be done here
56
- * @param desiredFeatures The desired feature set
57
- */
58
- constructor(desiredFeatures: WasmFeature[]);
59
- /**
60
- * Is Wasm allowed
61
- */
62
- get allowWasm(): boolean;
63
- /**
64
- * Whether or not to allow WASM usage
65
- */
66
- set allowWasm(v: boolean);
67
- /**
68
- * Whether or not Wasm should be used based on the desired
69
- * feature set, initialization state, or force-use settings
70
- */
71
- get canUseWasm(): boolean;
72
- /**
73
- * Returns a object containing a property for each desired wasm feature
74
- * with a boolean value indicating whether or not the feature is supported
75
- */
76
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
77
- /**
78
- * Force use of Wasm
79
- */
80
- get forceWasm(): boolean;
81
- /**
82
- * Whether or not to force Wasm usage
83
- */
84
- set forceWasm(v: boolean);
85
- /**
86
- * Whether or not Wasm is supported based
87
- * on the desired feature set
88
- */
89
- get isDesiredFeatureSetSupported(): boolean;
90
- /**
91
- * Whether or not Wasm detection has been run
92
- * for the desired feature set
93
- */
94
- get isInitialized(): boolean;
95
- /**
96
- * Static creation & async initialization for use where
97
- * async instantiation is possible
98
- * @param desiredFeatures The desired feature set
99
- * @returns An initialized instance of the class with detection
100
- * for the desired feature set
101
- */
102
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
103
- /**
104
- * Checks for specific wasm features
105
- * @param features The list of features to check for
106
- * @returns True if all the features are supported, false otherwise
107
- */
108
- featureCheck(features: WasmFeature[]): Promise<boolean>;
109
- /**
110
- * Does feature detection for the desired feature set
111
- */
112
- initialize(): Promise<void>;
113
- protected detectDesiredFeatures(): Promise<void>;
114
- }
115
- //# sourceMappingURL=WasmSupport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,oBAAoB;;;;;;;;;;iGAoCa,CAAC;;qEAoB7C,CAAD;;;;;;;;;QAlBC;;WAEG;QACH,CAHF,CAAE;;WAEG;;;;;;;;;;;;;;CAvBK,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,oBAAoB,CAAA;AAE3D,qBAAa,WAAW;IAeV,SAAS,CAAC,eAAe,EAAE,WAAW,EAAE;IAdpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,0BAA0B,CAAQ;IAE1C;;;;;;;OAOG;gBACmB,eAAe,EAAE,WAAW,EAAE;IAEpD;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,OAAO,CASxB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED;;;OAGG;IACH,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;;;;OAMG;WACU,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAMzE;;;;OAIG;IACG,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAMjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}