@xyo-network/wasm 2.106.0 → 2.107.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.
@@ -24,68 +24,17 @@ export declare class WasmSupport {
24
24
  private _forceWasm;
25
25
  private _isInitialized;
26
26
  private _isWasmFeatureSetSupported;
27
- /**
28
- * Instance constructor for use where async instantiation
29
- * is not possible. Where possible, prefer the static
30
- * create method over use of this constructor directly
31
- * as no initialization (feature detection) is able to
32
- * be done here
33
- * @param desiredFeatures The desired feature set
34
- */
35
27
  constructor(desiredFeatures: WasmFeature[]);
36
- /**
37
- * Is Wasm allowed
38
- */
39
28
  get allowWasm(): boolean;
40
- /**
41
- * Whether or not to allow WASM usage
42
- */
43
29
  set allowWasm(v: boolean);
44
- /**
45
- * Whether or not Wasm should be used based on the desired
46
- * feature set, initialization state, or force-use settings
47
- */
48
30
  get canUseWasm(): boolean;
49
- /**
50
- * Returns a object containing a property for each desired wasm feature
51
- * with a boolean value indicating whether or not the feature is supported
52
- */
53
31
  get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
54
- /**
55
- * Force use of Wasm
56
- */
57
32
  get forceWasm(): boolean;
58
- /**
59
- * Whether or not to force Wasm usage
60
- */
61
33
  set forceWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm is supported based
64
- * on the desired feature set
65
- */
66
34
  get isDesiredFeatureSetSupported(): boolean;
67
- /**
68
- * Whether or not Wasm detection has been run
69
- * for the desired feature set
70
- */
71
35
  get isInitialized(): boolean;
72
- /**
73
- * Static creation & async initialization for use where
74
- * async instantiation is possible
75
- * @param desiredFeatures The desired feature set
76
- * @returns An initialized instance of the class with detection
77
- * for the desired feature set
78
- */
79
36
  static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
80
- /**
81
- * Checks for specific wasm features
82
- * @param features The list of features to check for
83
- * @returns True if all the features are supported, false otherwise
84
- */
85
37
  featureCheck(features: WasmFeature[]): Promise<boolean>;
86
- /**
87
- * Does feature detection for the desired feature set
88
- */
89
38
  initialize(): Promise<void>;
90
39
  protected detectDesiredFeatures(): Promise<void>;
91
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBvB,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;IACD;;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;IACD;;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,CA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{
24
24
  private _forceWasm;
25
25
  private _isInitialized;
26
26
  private _isWasmFeatureSetSupported;
27
- /**
28
- * Instance constructor for use where async instantiation
29
- * is not possible. Where possible, prefer the static
30
- * create method over use of this constructor directly
31
- * as no initialization (feature detection) is able to
32
- * be done here
33
- * @param desiredFeatures The desired feature set
34
- */
35
27
  constructor(desiredFeatures: WasmFeature[]);
36
- /**
37
- * Is Wasm allowed
38
- */
39
28
  get allowWasm(): boolean;
40
- /**
41
- * Whether or not to allow WASM usage
42
- */
43
29
  set allowWasm(v: boolean);
44
- /**
45
- * Whether or not Wasm should be used based on the desired
46
- * feature set, initialization state, or force-use settings
47
- */
48
30
  get canUseWasm(): boolean;
49
- /**
50
- * Returns a object containing a property for each desired wasm feature
51
- * with a boolean value indicating whether or not the feature is supported
52
- */
53
31
  get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
54
- /**
55
- * Force use of Wasm
56
- */
57
32
  get forceWasm(): boolean;
58
- /**
59
- * Whether or not to force Wasm usage
60
- */
61
33
  set forceWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm is supported based
64
- * on the desired feature set
65
- */
66
34
  get isDesiredFeatureSetSupported(): boolean;
67
- /**
68
- * Whether or not Wasm detection has been run
69
- * for the desired feature set
70
- */
71
35
  get isInitialized(): boolean;
72
- /**
73
- * Static creation & async initialization for use where
74
- * async instantiation is possible
75
- * @param desiredFeatures The desired feature set
76
- * @returns An initialized instance of the class with detection
77
- * for the desired feature set
78
- */
79
36
  static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
80
- /**
81
- * Checks for specific wasm features
82
- * @param features The list of features to check for
83
- * @returns True if all the features are supported, false otherwise
84
- */
85
37
  featureCheck(features: WasmFeature[]): Promise<boolean>;
86
- /**
87
- * Does feature detection for the desired feature set
88
- */
89
38
  initialize(): Promise<void>;
90
39
  protected detectDesiredFeatures(): Promise<void>;
91
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","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","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBvB,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;gBAUpB,eAAe,EAAE,WAAW,EAAE;IAKpD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,UAAU,IAAI,OAAO,CASxB;IAMD,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAKD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAMD,IAAI,aAAa,IAAI,OAAO,CAE3B;WASY,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAWnE,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAOjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -24,68 +24,17 @@ export declare class WasmSupport {
24
24
  private _forceWasm;
25
25
  private _isInitialized;
26
26
  private _isWasmFeatureSetSupported;
27
- /**
28
- * Instance constructor for use where async instantiation
29
- * is not possible. Where possible, prefer the static
30
- * create method over use of this constructor directly
31
- * as no initialization (feature detection) is able to
32
- * be done here
33
- * @param desiredFeatures The desired feature set
34
- */
35
27
  constructor(desiredFeatures: WasmFeature[]);
36
- /**
37
- * Is Wasm allowed
38
- */
39
28
  get allowWasm(): boolean;
40
- /**
41
- * Whether or not to allow WASM usage
42
- */
43
29
  set allowWasm(v: boolean);
44
- /**
45
- * Whether or not Wasm should be used based on the desired
46
- * feature set, initialization state, or force-use settings
47
- */
48
30
  get canUseWasm(): boolean;
49
- /**
50
- * Returns a object containing a property for each desired wasm feature
51
- * with a boolean value indicating whether or not the feature is supported
52
- */
53
31
  get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
54
- /**
55
- * Force use of Wasm
56
- */
57
32
  get forceWasm(): boolean;
58
- /**
59
- * Whether or not to force Wasm usage
60
- */
61
33
  set forceWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm is supported based
64
- * on the desired feature set
65
- */
66
34
  get isDesiredFeatureSetSupported(): boolean;
67
- /**
68
- * Whether or not Wasm detection has been run
69
- * for the desired feature set
70
- */
71
35
  get isInitialized(): boolean;
72
- /**
73
- * Static creation & async initialization for use where
74
- * async instantiation is possible
75
- * @param desiredFeatures The desired feature set
76
- * @returns An initialized instance of the class with detection
77
- * for the desired feature set
78
- */
79
36
  static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
80
- /**
81
- * Checks for specific wasm features
82
- * @param features The list of features to check for
83
- * @returns True if all the features are supported, false otherwise
84
- */
85
37
  featureCheck(features: WasmFeature[]): Promise<boolean>;
86
- /**
87
- * Does feature detection for the desired feature set
88
- */
89
38
  initialize(): Promise<void>;
90
39
  protected detectDesiredFeatures(): Promise<void>;
91
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBvB,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,oBAA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,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;gBAUpB,eAAe,EAAE,WAAW,EAAE;IAKpD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,UAAU,IAAI,OAAO,CASxB;IAMD,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAKD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAMD,IAAI,aAAa,IAAI,OAAO,CAE3B;WASY,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAWnE,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAOjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -1,177 +1,2 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- WasmFeatureDetectors: () => WasmFeatureDetectors,
25
- WasmSupport: () => WasmSupport
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/WasmSupport.ts
30
- var import_wasm_feature_detect = require("wasm-feature-detect");
31
- var WasmFeatureDetectors = {
32
- bigInt: import_wasm_feature_detect.bigInt,
33
- bulkMemory: import_wasm_feature_detect.bulkMemory,
34
- exceptions: import_wasm_feature_detect.exceptions,
35
- extendedConst: import_wasm_feature_detect.extendedConst,
36
- gc: import_wasm_feature_detect.gc,
37
- memory64: import_wasm_feature_detect.memory64,
38
- multiValue: import_wasm_feature_detect.multiValue,
39
- mutableGlobals: import_wasm_feature_detect.mutableGlobals,
40
- referenceTypes: import_wasm_feature_detect.referenceTypes,
41
- relaxedSimd: import_wasm_feature_detect.relaxedSimd,
42
- saturatedFloatToInt: import_wasm_feature_detect.saturatedFloatToInt,
43
- signExtensions: import_wasm_feature_detect.signExtensions,
44
- simd: import_wasm_feature_detect.simd,
45
- streamingCompilation: import_wasm_feature_detect.streamingCompilation,
46
- tailCall: import_wasm_feature_detect.tailCall,
47
- threads: import_wasm_feature_detect.threads
48
- };
49
- var _WasmSupport = class _WasmSupport {
50
- desiredFeatures;
51
- _allowWasm;
52
- _featureSupport;
53
- _forceWasm;
54
- _isInitialized;
55
- _isWasmFeatureSetSupported;
56
- /**
57
- * Instance constructor for use where async instantiation
58
- * is not possible. Where possible, prefer the static
59
- * create method over use of this constructor directly
60
- * as no initialization (feature detection) is able to
61
- * be done here
62
- * @param desiredFeatures The desired feature set
63
- */
64
- constructor(desiredFeatures) {
65
- this.desiredFeatures = desiredFeatures;
66
- this._allowWasm = true;
67
- this._featureSupport = {};
68
- this._forceWasm = false;
69
- this._isInitialized = false;
70
- this._isWasmFeatureSetSupported = false;
71
- }
72
- /**
73
- * Is Wasm allowed
74
- */
75
- get allowWasm() {
76
- return this._allowWasm;
77
- }
78
- /**
79
- * Whether or not to allow WASM usage
80
- */
81
- set allowWasm(v) {
82
- this._allowWasm = v;
83
- }
84
- /**
85
- * Whether or not Wasm should be used based on the desired
86
- * feature set, initialization state, or force-use settings
87
- */
88
- get canUseWasm() {
89
- return (
90
- // Just force WASM
91
- this._forceWasm || // Or if we haven't checked be optimistic
92
- this._allowWasm && !this._isInitialized || // Or if we have checked and WASM is not supported, be realistic
93
- this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported
94
- );
95
- }
96
- /**
97
- * Returns a object containing a property for each desired wasm feature
98
- * with a boolean value indicating whether or not the feature is supported
99
- */
100
- get featureSupport() {
101
- return {
102
- ...this._featureSupport
103
- };
104
- }
105
- /**
106
- * Force use of Wasm
107
- */
108
- get forceWasm() {
109
- return this._forceWasm;
110
- }
111
- /**
112
- * Whether or not to force Wasm usage
113
- */
114
- set forceWasm(v) {
115
- this._forceWasm = v;
116
- }
117
- /**
118
- * Whether or not Wasm is supported based
119
- * on the desired feature set
120
- */
121
- get isDesiredFeatureSetSupported() {
122
- return this._isWasmFeatureSetSupported;
123
- }
124
- /**
125
- * Whether or not Wasm detection has been run
126
- * for the desired feature set
127
- */
128
- get isInitialized() {
129
- return this._isInitialized;
130
- }
131
- /**
132
- * Static creation & async initialization for use where
133
- * async instantiation is possible
134
- * @param desiredFeatures The desired feature set
135
- * @returns An initialized instance of the class with detection
136
- * for the desired feature set
137
- */
138
- static async create(desiredFeatures) {
139
- const instance = new _WasmSupport(desiredFeatures);
140
- await instance.initialize();
141
- return instance;
142
- }
143
- /**
144
- * Checks for specific wasm features
145
- * @param features The list of features to check for
146
- * @returns True if all the features are supported, false otherwise
147
- */
148
- async featureCheck(features) {
149
- const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()));
150
- return results.every(Boolean);
151
- }
152
- /**
153
- * Does feature detection for the desired feature set
154
- */
155
- async initialize() {
156
- if (this._isInitialized) return;
157
- await this.detectDesiredFeatures();
158
- this._isInitialized = true;
159
- return;
160
- }
161
- async detectDesiredFeatures() {
162
- for (let feature = 0; feature < this.desiredFeatures.length; feature++) {
163
- const desiredFeature = this.desiredFeatures[feature];
164
- const detector = WasmFeatureDetectors[desiredFeature];
165
- this._featureSupport[desiredFeature] = await detector() ? true : false;
166
- }
167
- this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean);
168
- }
169
- };
170
- __name(_WasmSupport, "WasmSupport");
171
- var WasmSupport = _WasmSupport;
172
- // Annotate the CommonJS export names for ESM import in node:
173
- 0 && (module.exports = {
174
- WasmFeatureDetectors,
175
- WasmSupport
176
- });
1
+ "use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var d=(a,t)=>o(a,"name",{value:t,configurable:!0});var h=(a,t)=>{for(var s in t)o(a,s,{get:t[s],enumerable:!0})},_=(a,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of c(t))!p.call(a,r)&&r!==s&&o(a,r,{get:()=>t[r],enumerable:!(i=m(t,r))||i.enumerable});return a};var f=a=>_(o({},"__esModule",{value:!0}),a);var W={};h(W,{WasmFeatureDetectors:()=>n,WasmSupport:()=>u});module.exports=f(W);var e=require("wasm-feature-detect");var n={bigInt:e.bigInt,bulkMemory:e.bulkMemory,exceptions:e.exceptions,extendedConst:e.extendedConst,gc:e.gc,memory64:e.memory64,multiValue:e.multiValue,mutableGlobals:e.mutableGlobals,referenceTypes:e.referenceTypes,relaxedSimd:e.relaxedSimd,saturatedFloatToInt:e.saturatedFloatToInt,signExtensions:e.signExtensions,simd:e.simd,streamingCompilation:e.streamingCompilation,tailCall:e.tailCall,threads:e.threads},l=class l{desiredFeatures;_allowWasm;_featureSupport;_forceWasm;_isInitialized;_isWasmFeatureSetSupported;constructor(t){this.desiredFeatures=t,this._allowWasm=!0,this._featureSupport={},this._forceWasm=!1,this._isInitialized=!1,this._isWasmFeatureSetSupported=!1}get allowWasm(){return this._allowWasm}set allowWasm(t){this._allowWasm=t}get canUseWasm(){return this._forceWasm||this._allowWasm&&!this._isInitialized||this._allowWasm&&this._isInitialized&&this._isWasmFeatureSetSupported}get featureSupport(){return{...this._featureSupport}}get forceWasm(){return this._forceWasm}set forceWasm(t){this._forceWasm=t}get isDesiredFeatureSetSupported(){return this._isWasmFeatureSetSupported}get isInitialized(){return this._isInitialized}static async create(t){let s=new l(t);return await s.initialize(),s}async featureCheck(t){return(await Promise.all(t.map(i=>n[i]).map(async i=>await i()))).every(Boolean)}async initialize(){this._isInitialized||(await this.detectDesiredFeatures(),this._isInitialized=!0)}async detectDesiredFeatures(){for(let t=0;t<this.desiredFeatures.length;t++){let s=this.desiredFeatures[t],i=n[s];this._featureSupport[s]=!!await i()}this._isWasmFeatureSetSupported=Object.values(this._featureSupport).every(Boolean)}};d(l,"WasmSupport");var u=l;0&&(module.exports={WasmFeatureDetectors,WasmSupport});
177
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/WasmSupport.ts"],"sourcesContent":["export * from './WasmSupport'\n","import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n referenceTypes,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: referenceTypes,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,iCAiBO;AAEA,IAAMA,uBAAuB;EAClCC,QAAQA;EACRC,YAAYA;EACZC,YAAYA;EACZC,eAAeA;EACfC,IAAIA;EACJC,UAAUA;EACVC,YAAYA;EACZC,gBAAgBA;EAChBC,gBAAgBA;EAChBC,aAAaA;EACbC,qBAAqBA;EACrBC,gBAAgBA;EAChBC,MAAMA;EACNC,sBAAsBA;EACtBC,UAAUA;EACVC,SAASA;AACX;AAIO,IAAMC,eAAN,MAAMA,aAAAA;;EACHC;EACAC;EACAC;EACAC;EACAC;;;;;;;;;EAURC,YAAsBC,iBAAgC;SAAhCA,kBAAAA;SAddN,aAAa;SACbC,kBAAyD,CAAC;SAC1DC,aAAa;SACbC,iBAAiB;SACjBC,6BAA6B;EAUkB;;;;EAKvD,IAAIG,YAAqB;AACvB,WAAO,KAAKP;EACd;;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AMC,OAAAA;EAC9E;AACF;AA3Ha3B;AAAN,IAAMA,cAAN;","names":["WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","results","Promise","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/WasmSupport.ts"],"sourcesContent":["export * from './WasmSupport'\n","import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n referenceTypes,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: referenceTypes,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":"4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,gBAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAiBO,+BAEA,IAAMC,EAAuB,CAClCC,OAAQA,SACRC,WAAYA,aACZC,WAAYA,aACZC,cAAeA,gBACfC,GAAIA,KACJC,SAAUA,WACVC,WAAYA,aACZC,eAAgBA,iBAChBC,eAAgBA,iBAChBC,YAAaA,cACbC,oBAAqBA,sBACrBC,eAAgBA,iBAChBC,KAAMA,OACNC,qBAAsBA,uBACtBC,SAAUA,WACVC,QAASA,SACX,EAIaC,EAAN,MAAMA,CAAAA,iBACHC,WACAC,gBACAC,WACAC,eACAC,2BAURC,YAAsBC,EAAgC,MAAhCA,gBAAAA,OAddN,WAAa,QACbC,gBAAyD,CAAC,OAC1DC,WAAa,QACbC,eAAiB,QACjBC,2BAA6B,EAUkB,CAKvD,IAAIG,WAAqB,CACvB,OAAO,KAAKP,UACd,CAIA,IAAIO,UAAUC,EAAY,CACxB,KAAKR,WAAaQ,CACpB,CAMA,IAAIC,YAAsB,CACxB,OAEE,KAAKP,YAEJ,KAAKF,YAAc,CAAC,KAAKG,gBAEzB,KAAKH,YAAc,KAAKG,gBAAkB,KAAKC,0BAEpD,CAMA,IAAIM,gBAAkE,CACpE,MAAO,CAAE,GAAG,KAAKT,eAAgB,CACnC,CAKA,IAAIU,WAAqB,CACvB,OAAO,KAAKT,UACd,CAIA,IAAIS,UAAUH,EAAY,CACxB,KAAKN,WAAaM,CACpB,CAMA,IAAII,8BAAwC,CAC1C,OAAO,KAAKR,0BACd,CAMA,IAAIS,eAAyB,CAC3B,OAAO,KAAKV,cACd,CASA,aAAaW,OAAOR,EAAsD,CACxE,IAAMS,EAAW,IAAIhB,EAAYO,CAAAA,EACjC,aAAMS,EAASC,WAAU,EAClBD,CACT,CAOA,MAAME,aAAaC,EAA2C,CAE5D,OADgB,MAAMC,QAAQC,IAAIF,EAASG,IAAKC,GAAYxC,EAAqBwC,CAAAA,CAAQ,EAAED,IAAI,MAAOE,GAAa,MAAMA,EAAAA,CAAAA,CAAAA,GAC1GC,MAAMC,OAAAA,CACvB,CAKA,MAAMT,YAA4B,CAC5B,KAAKb,iBACT,MAAM,KAAKuB,sBAAqB,EAChC,KAAKvB,eAAiB,GAExB,CAEA,MAAgBuB,uBAAuC,CACrD,QAASJ,EAAU,EAAGA,EAAU,KAAKhB,gBAAgBqB,OAAQL,IAAW,CACtE,IAAMM,EAAiB,KAAKtB,gBAAgBgB,CAAAA,EACtCC,EAAWzC,EAAqB8C,CAAAA,EACtC,KAAK3B,gBAAgB2B,CAAAA,EAAmB,QAAML,EAAAA,CAChD,CACA,KAAKnB,2BAA6ByB,OAAOC,OAAO,KAAK7B,eAAe,EAAEuB,MAAMC,OAAAA,CAC9E,CACF,EA3Ha1B,EAAAA,EAAAA,eAAN,IAAMA,EAANgC","names":["src_exports","__export","WasmFeatureDetectors","WasmSupport","__toCommonJS","import_wasm_feature_detect","WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","Promise","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values","_WasmSupport"]}
@@ -1,151 +1,2 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/WasmSupport.ts
5
- import { bigInt, bulkMemory, exceptions, extendedConst, gc, memory64, multiValue, mutableGlobals, referenceTypes, relaxedSimd, saturatedFloatToInt, signExtensions, simd, streamingCompilation, tailCall, threads } from "wasm-feature-detect";
6
- var WasmFeatureDetectors = {
7
- bigInt,
8
- bulkMemory,
9
- exceptions,
10
- extendedConst,
11
- gc,
12
- memory64,
13
- multiValue,
14
- mutableGlobals,
15
- referenceTypes,
16
- relaxedSimd,
17
- saturatedFloatToInt,
18
- signExtensions,
19
- simd,
20
- streamingCompilation,
21
- tailCall,
22
- threads
23
- };
24
- var _WasmSupport = class _WasmSupport {
25
- desiredFeatures;
26
- _allowWasm;
27
- _featureSupport;
28
- _forceWasm;
29
- _isInitialized;
30
- _isWasmFeatureSetSupported;
31
- /**
32
- * Instance constructor for use where async instantiation
33
- * is not possible. Where possible, prefer the static
34
- * create method over use of this constructor directly
35
- * as no initialization (feature detection) is able to
36
- * be done here
37
- * @param desiredFeatures The desired feature set
38
- */
39
- constructor(desiredFeatures) {
40
- this.desiredFeatures = desiredFeatures;
41
- this._allowWasm = true;
42
- this._featureSupport = {};
43
- this._forceWasm = false;
44
- this._isInitialized = false;
45
- this._isWasmFeatureSetSupported = false;
46
- }
47
- /**
48
- * Is Wasm allowed
49
- */
50
- get allowWasm() {
51
- return this._allowWasm;
52
- }
53
- /**
54
- * Whether or not to allow WASM usage
55
- */
56
- set allowWasm(v) {
57
- this._allowWasm = v;
58
- }
59
- /**
60
- * Whether or not Wasm should be used based on the desired
61
- * feature set, initialization state, or force-use settings
62
- */
63
- get canUseWasm() {
64
- return (
65
- // Just force WASM
66
- this._forceWasm || // Or if we haven't checked be optimistic
67
- this._allowWasm && !this._isInitialized || // Or if we have checked and WASM is not supported, be realistic
68
- this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported
69
- );
70
- }
71
- /**
72
- * Returns a object containing a property for each desired wasm feature
73
- * with a boolean value indicating whether or not the feature is supported
74
- */
75
- get featureSupport() {
76
- return {
77
- ...this._featureSupport
78
- };
79
- }
80
- /**
81
- * Force use of Wasm
82
- */
83
- get forceWasm() {
84
- return this._forceWasm;
85
- }
86
- /**
87
- * Whether or not to force Wasm usage
88
- */
89
- set forceWasm(v) {
90
- this._forceWasm = v;
91
- }
92
- /**
93
- * Whether or not Wasm is supported based
94
- * on the desired feature set
95
- */
96
- get isDesiredFeatureSetSupported() {
97
- return this._isWasmFeatureSetSupported;
98
- }
99
- /**
100
- * Whether or not Wasm detection has been run
101
- * for the desired feature set
102
- */
103
- get isInitialized() {
104
- return this._isInitialized;
105
- }
106
- /**
107
- * Static creation & async initialization for use where
108
- * async instantiation is possible
109
- * @param desiredFeatures The desired feature set
110
- * @returns An initialized instance of the class with detection
111
- * for the desired feature set
112
- */
113
- static async create(desiredFeatures) {
114
- const instance = new _WasmSupport(desiredFeatures);
115
- await instance.initialize();
116
- return instance;
117
- }
118
- /**
119
- * Checks for specific wasm features
120
- * @param features The list of features to check for
121
- * @returns True if all the features are supported, false otherwise
122
- */
123
- async featureCheck(features) {
124
- const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()));
125
- return results.every(Boolean);
126
- }
127
- /**
128
- * Does feature detection for the desired feature set
129
- */
130
- async initialize() {
131
- if (this._isInitialized) return;
132
- await this.detectDesiredFeatures();
133
- this._isInitialized = true;
134
- return;
135
- }
136
- async detectDesiredFeatures() {
137
- for (let feature = 0; feature < this.desiredFeatures.length; feature++) {
138
- const desiredFeature = this.desiredFeatures[feature];
139
- const detector = WasmFeatureDetectors[desiredFeature];
140
- this._featureSupport[desiredFeature] = await detector() ? true : false;
141
- }
142
- this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean);
143
- }
144
- };
145
- __name(_WasmSupport, "WasmSupport");
146
- var WasmSupport = _WasmSupport;
147
- export {
148
- WasmFeatureDetectors,
149
- WasmSupport
150
- };
1
+ var n=Object.defineProperty;var i=(l,e)=>n(l,"name",{value:e,configurable:!0});import{bigInt as u,bulkMemory as d,exceptions as m,extendedConst as c,gc as p,memory64 as h,multiValue as _,mutableGlobals as f,referenceTypes as W,relaxedSimd as S,saturatedFloatToInt as F,signExtensions as g,simd as w,streamingCompilation as y,tailCall as I,threads as x}from"wasm-feature-detect";var r={bigInt:u,bulkMemory:d,exceptions:m,extendedConst:c,gc:p,memory64:h,multiValue:_,mutableGlobals:f,referenceTypes:W,relaxedSimd:S,saturatedFloatToInt:F,signExtensions:g,simd:w,streamingCompilation:y,tailCall:I,threads:x},a=class a{desiredFeatures;_allowWasm;_featureSupport;_forceWasm;_isInitialized;_isWasmFeatureSetSupported;constructor(e){this.desiredFeatures=e,this._allowWasm=!0,this._featureSupport={},this._forceWasm=!1,this._isInitialized=!1,this._isWasmFeatureSetSupported=!1}get allowWasm(){return this._allowWasm}set allowWasm(e){this._allowWasm=e}get canUseWasm(){return this._forceWasm||this._allowWasm&&!this._isInitialized||this._allowWasm&&this._isInitialized&&this._isWasmFeatureSetSupported}get featureSupport(){return{...this._featureSupport}}get forceWasm(){return this._forceWasm}set forceWasm(e){this._forceWasm=e}get isDesiredFeatureSetSupported(){return this._isWasmFeatureSetSupported}get isInitialized(){return this._isInitialized}static async create(e){let t=new a(e);return await t.initialize(),t}async featureCheck(e){return(await Promise.all(e.map(s=>r[s]).map(async s=>await s()))).every(Boolean)}async initialize(){this._isInitialized||(await this.detectDesiredFeatures(),this._isInitialized=!0)}async detectDesiredFeatures(){for(let e=0;e<this.desiredFeatures.length;e++){let t=this.desiredFeatures[e],s=r[t];this._featureSupport[t]=!!await s()}this._isWasmFeatureSetSupported=Object.values(this._featureSupport).every(Boolean)}};i(a,"WasmSupport");var o=a;export{r as WasmFeatureDetectors,o as WasmSupport};
151
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/WasmSupport.ts"],"sourcesContent":["import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n referenceTypes,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: referenceTypes,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":";;;;AAAA,SACEA,QACAC,YACAC,YACAC,eACAC,IACAC,UACAC,YACAC,gBACAC,gBACAC,aACAC,qBACAC,gBACAC,MACAC,sBACAC,UACAC,eACK;AAEA,IAAMC,uBAAuB;EAClCC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;AACF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jB,gBAAgBsB,QAAQL,WAAW;AACtE,YAAMM,iBAAiB,KAAKvB,gBAAgBiB,OAAAA;AAC5C,YAAMC,WAAW1C,qBAAqB+C,cAAAA;AACtC,WAAK5B,gBAAgB4B,cAAAA,IAAmB,MAAML,SAAAA,IAAc,OAAO;IACrE;AACA,SAAKpB,6BAA6B0B,OAAOC,OAAO,KAAK9B,eAAe,EAAEwB,MAAMC,OAAAA;EAC9E;AACF;AA3Ha3B;AAAN,IAAMA,cAAN;","names":["bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","results","Promise","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values"]}
1
+ {"version":3,"sources":["../../src/WasmSupport.ts"],"sourcesContent":["import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n referenceTypes,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: referenceTypes,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":"+EAAA,OACEA,UAAAA,EACAC,cAAAA,EACAC,cAAAA,EACAC,iBAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,cAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,eAAAA,EACAC,uBAAAA,EACAC,kBAAAA,EACAC,QAAAA,EACAC,wBAAAA,EACAC,YAAAA,EACAC,WAAAA,MACK,sBAEA,IAAMC,EAAuB,CAClCC,OAAQA,EACRC,WAAYA,EACZC,WAAYA,EACZC,cAAeA,EACfC,GAAIA,EACJC,SAAUA,EACVC,WAAYA,EACZC,eAAgBA,EAChBC,eAAgBA,EAChBC,YAAaA,EACbC,oBAAqBA,EACrBC,eAAgBA,EAChBC,KAAMA,EACNC,qBAAsBA,EACtBC,SAAUA,EACVC,QAASA,CACX,EAIaC,EAAN,MAAMA,CAAAA,iBACHC,WACAC,gBACAC,WACAC,eACAC,2BAURC,YAAsBC,EAAgC,MAAhCA,gBAAAA,OAddN,WAAa,QACbC,gBAAyD,CAAC,OAC1DC,WAAa,QACbC,eAAiB,Q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AAN,IAAMA,EAANgC","names":["bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","Promise","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values","_WasmSupport"]}