forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asconfig-schema.json
295 lines (295 loc) · 8.94 KB
/
asconfig-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"definitions": {
"nonEmptyString": {
"type": "string",
"minLength": 1
},
"arrayOfNonEmptyStrings": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/nonEmptyString"
}
},
"nonEmptyStringOrArrayOfNonEmptyStrings": {
"anyOf": [
{
"$ref": "#/definitions/nonEmptyString"
},
{
"$ref": "#/definitions/arrayOfNonEmptyStrings"
}
]
},
"webAssemblyFeatures": {
"type": "string",
"enum": [
"sign-extension",
"mutable-globals",
"nontrapping-f2i",
"bulk-memory",
"simd",
"threads",
"exception-handling",
"tail-calls",
"reference-types",
"multi-value",
"gc",
"memory64"
]
},
"compilerOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"optimize": {
"description": "Optimizes the module.",
"type": "boolean"
},
"optimizeLevel": {
"description": "How much to focus on optimizing code.",
"type": "number",
"minimum": 0,
"maximum": 3
},
"shrinkLevel": {
"description": "How much to focus on shrinking code size.",
"type": "number",
"minimum": 0,
"maximum": 2
},
"converge": {
"description": "Re-optimizes until no further improvements can be made.",
"type": "boolean"
},
"baseDir": {
"$ref": "#/definitions/nonEmptyString",
"description": "Specifies the base directory of input and output files."
},
"outFile": {
"$ref": "#/definitions/nonEmptyString",
"description": "Specifies the WebAssembly output file (.wasm)."
},
"textFile": {
"$ref": "#/definitions/nonEmptyString",
"description": "Specifies the WebAssembly text output file (.wat)."
},
"bindings": {
"description": "Specified the bindings to generate.",
"definitions": {
"bindings": {
"enum": ["esm", "raw"]
}
},
"anyOf": [
{
"$ref": "#/definitions/compilerOptions/properties/bindings/definitions/bindings"
},
{
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/compilerOptions/properties/bindings/definitions/bindings"
}
}
]
},
"sourceMap": {
"description": "Enables source map generation. Optionally takes the URL.",
"anyOf": [
{
"type": "boolean"
},
{
"$ref": "#/definitions/nonEmptyString"
}
]
},
"runtime": {
"description": "Specifies the runtime variant to include in the program.",
"anyOf": [
{
"type": "string",
"enum": ["incremental", "minimal", "stub"]
},
{
"$ref": "#/definitions/nonEmptyString"
}
]
},
"noUnsafe": {
"description": "Disallows the use of unsafe features in user code.",
"type": "boolean"
},
"debug": {
"description": "Enables debug information in emitted binaries.",
"type": "boolean"
},
"noAssert": {
"description": "Replaces assertions with just their value without trapping.",
"type": "boolean"
},
"noEmit": {
"description": "Performs compilation as usual but does not emit code.",
"type": "boolean"
},
"importMemory": {
"description": "Imports the memory provided as 'env.memory'.",
"type": "boolean"
},
"noExportMemory": {
"description": "Does not export the memory as 'memory'.",
"type": "boolean"
},
"initialMemory": {
"description": "Sets the initial memory size in pages.",
"type": "number"
},
"maximumMemory": {
"description": "Sets the maximum memory size in pages.",
"type": "number"
},
"sharedMemory": {
"description": "Declare memory as shared. Requires maximumMemory.",
"type": "number"
},
"zeroFilledMemory": {
"description": "Assume that imported memory is zero filled. Requires importMemory.",
"type": "boolean"
},
"memoryBase": {
"description": "Sets the start offset of compiler-generated static memory.",
"type": "number"
},
"importTable": {
"description": "Imports the function table provided as 'env.table'.",
"type": "boolean"
},
"exportTable": {
"description": "Exports the function table as 'table'.",
"type": "boolean"
},
"exportStart": {
"$ref": "#/definitions/nonEmptyString",
"description": "Exports the start function instead of calling it implicitly."
},
"lib": {
"$ref": "#/definitions/nonEmptyStringOrArrayOfNonEmptyStrings",
"description": "Adds one or multiple paths to custom library components."
},
"path": {
"$ref": "#/definitions/nonEmptyStringOrArrayOfNonEmptyStrings",
"description": "Adds one or multiple paths to package resolution."
},
"use": {
"$ref": "#/definitions/nonEmptyStringOrArrayOfNonEmptyStrings",
"description": "Aliases a global object under another name."
},
"trapMode": {
"description": "Sets the trap mode to use.",
"type": "string",
"enum": ["allow", "clamp", "js"]
},
"runPasses": {
"$ref": "#/definitions/nonEmptyStringOrArrayOfNonEmptyStrings",
"description": "Specifies additional Binaryen passes to run."
},
"noValidate": {
"description": "Skips validating the module using Binaryen.",
"type": "boolean"
},
"enable": {
"description": "Enables WebAssembly features that are disabled by default.",
"anyOf": [
{
"$ref": "#/definitions/webAssemblyFeatures"
},
{
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/webAssemblyFeatures"
}
}
]
},
"disable": {
"description": "Disables WebAssembly features that are enabled by default.",
"anyOf": [
{
"$ref": "#/definitions/webAssemblyFeatures"
},
{
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/webAssemblyFeatures"
}
}
]
},
"transform": {
"$ref": "#/definitions/nonEmptyStringOrArrayOfNonEmptyStrings",
"description": "Specifies the path to a custom transform to 'require'."
},
"pedantic": {
"description": "Make yourself sad for no good reason.",
"type": "boolean"
},
"stats": {
"description": "Prints measuring information on I/O and compile times.",
"type": "boolean"
},
"noColors": {
"description": "Disables terminal colors.",
"type": "boolean"
},
"exportRuntime": {
"description": "Exports the runtime helpers (__new, __collect etc.).",
"type": "boolean"
},
"stackSize": {
"description": "Exports the runtime helpers (__new, __collect etc.).",
"type": "number",
"minimum": 0
},
"lowMemoryLimit": {
"description": "Enforces very low (<64k) memory constraints.",
"type": "number",
"minimum": 0
},
"tableBase": {
"description": "Sets the start offset of emitted table elements.",
"type": "number",
"minimum": 0
},
"wasm": {
"$ref": "#/definitions/nonEmptyString",
"description": "Uses the specified Wasm binary of the compiler."
}
}
}
},
"id": "https://json.schemastore.org/asconfig-schema.json",
"properties": {
"extends": {
"$ref": "#/definitions/nonEmptyString"
},
"entries": {
"$ref": "#/definitions/arrayOfNonEmptyStrings"
},
"options": {
"$ref": "#/definitions/compilerOptions"
},
"targets": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/compilerOptions"
}
}
},
"title": "JSON schema for asconfig.json",
"type": "object"
}