forked from AssemblyScript/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.json
403 lines (395 loc) · 11.7 KB
/
options.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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
{
"version": {
"category": "General",
"description": "Prints just the compiler's version and exits.",
"type": "b",
"alias": "v"
},
"help": {
"category": "General",
"description": "Prints this message and exits.",
"type": "b",
"alias": "h"
},
"config": {
"category": "General",
"description": "Configuration file to apply. CLI arguments take precedence.",
"type": "s",
"cliOnly": true
},
"target": {
"category": "General",
"description": "Configuration file target to use. Defaults to 'release'.",
"type": "s",
"cliOnly": true
},
"optimize": {
"category": "Optimization",
"description": [
"Optimizes the module. Typical shorthands are:",
"",
" Default optimizations -O",
" Make a release build -O --noAssert",
" Make a debug build --debug",
" Optimize for speed -Ospeed",
" Optimize for size -Osize",
""
],
"type": "b",
"alias": "O"
},
"optimizeLevel": {
"category": "Optimization",
"description": "How much to focus on optimizing code. [0-3]",
"type": "i"
},
"shrinkLevel": {
"category": "Optimization",
"description": "How much to focus on shrinking code size. [0-2, s=1, z=2]",
"type": "i"
},
"converge": {
"category": "Optimization",
"description": "Re-optimizes until no further improvements can be made.",
"type": "b",
"default": false
},
"noAssert": {
"category": "Optimization",
"description": "Replaces assertions with just their value without trapping.",
"type": "b",
"default": false
},
"outFile": {
"category": "Output",
"description": "Specifies the WebAssembly output file (.wasm).",
"type": "s",
"alias": "o",
"isPath": true
},
"textFile": {
"category": "Output",
"description": "Specifies the WebAssembly text output file (.wat).",
"type": "s",
"alias": "t",
"isPath": true
},
"bindings": {
"category": "Output",
"description": [
"Specifies the bindings to generate (.js + .d.ts).",
"",
" esm JavaScript bindings & typings for ESM integration.",
" raw Like esm, but exports just the instantiate function.",
" Useful where modules are meant to be instantiated",
" multiple times or non-ESM imports must be provided."
],
"type": "S",
"alias": "b"
},
"sourceMap": {
"category": "Debugging",
"description": [
"Enables source map generation. Optionally takes the URL",
"used to reference the source map from the binary file."
],
"type": "s"
},
"uncheckedBehavior": {
"category": "Debugging",
"description": [
"Changes the behavior of unchecked() expressions.",
"Using this option can potentially cause breakage.",
"",
" default The default behavior: unchecked operations are",
" only used inside of unchecked().",
" never Unchecked operations are never used, even when",
" inside of unchecked().",
" always Unchecked operations are always used if possible,",
" whether or not unchecked() is used."
],
"type": "s",
"default": "default"
},
"debug": {
"category": "Debugging",
"description": "Enables debug information in emitted binaries.",
"type": "b",
"default": false
},
"importMemory": {
"category": "Features",
"description": "Imports the memory from 'env.memory'.",
"type": "b",
"default": false
},
"noExportMemory": {
"category": "Features",
"description": "Does not export the memory as 'memory'.",
"type": "b",
"default": false
},
"initialMemory": {
"category": "Features",
"description": "Sets the initial memory size in pages.",
"type": "i",
"default": 0
},
"maximumMemory": {
"category": "Features",
"description": "Sets the maximum memory size in pages.",
"type": "i",
"default": 0
},
"sharedMemory": {
"category": "Features",
"description": "Declare memory as shared. Requires maximumMemory.",
"type": "b",
"default": false
},
"zeroFilledMemory": {
"category": "Features",
"description": "Assume imported memory is zeroed. Requires importMemory.",
"type": "b",
"default": false
},
"importTable": {
"category": "Features",
"description": "Imports the function table from 'env.table'.",
"type": "b",
"default": false
},
"exportTable": {
"category": "Features",
"description": "Exports the function table as 'table'.",
"type": "b",
"default": false
},
"exportStart": {
"category": "Features",
"description": [
"Exports the start function using the specified name instead",
"of calling it implicitly. Useful to obtain the exported memory",
"before executing any code accessing it."
],
"type": "s"
},
"runtime": {
"category": "Features",
"description": [
"Specifies the runtime variant to include in the program.",
"",
" incremental TLSF + incremental GC (default)",
" minimal TLSF + lightweight GC invoked externally",
" stub Minimal runtime stub (never frees)",
" ... Path to a custom runtime implementation",
""
],
"type": "s",
"default": "incremental"
},
"exportRuntime": {
"category": "Features",
"description": [
"Always exports the runtime helpers (__new, __collect, __pin etc.).",
"Automatically determined when generation of --bindings is enabled."
],
"type": "b",
"default": false
},
"stackSize": {
"category": "Features",
"description": [
"Overrides the stack size. Only relevant for incremental GC",
"or when using a custom runtime that requires stack space.",
"Defaults to 0 without and to 32768 with incremental GC."
],
"default": 0,
"type": "i"
},
"enable": {
"category": "Features",
"description": [
"Enables WebAssembly features being disabled by default.",
"",
" threads Threading and atomic operations.",
" simd SIMD types and operations.",
" reference-types Reference types and operations.",
" gc Garbage collection (WIP).",
" stringref String reference types.",
" relaxed-simd Relaxed SIMD operations.",
""
],
"TODO_doesNothingYet": [
" exception-handling Exception handling.",
" tail-calls Tail call operations.",
" multi-value Multi value types.",
" memory64 Memory64 operations.",
" extended-const Extended const expressions."
],
"type": "S",
"mutuallyExclusive": "disable"
},
"disable": {
"category": "Features",
"description": [
"Disables WebAssembly features being enabled by default.",
"",
" mutable-globals Mutable global imports and exports.",
" sign-extension Sign-extension operations",
" nontrapping-f2i Non-trapping float to integer ops.",
" bulk-memory Bulk memory operations.",
""
],
"type": "S",
"mutuallyExclusive": "enable"
},
"use": {
"category": "Features",
"description": [
"Aliases a global object under another name, e.g., to switch",
"the default 'Math' implementation used: --use Math=JSMath",
"Can also be used to introduce an integer constant."
],
"type": "S",
"alias": "u"
},
"lowMemoryLimit": {
"category": "Features",
"description": "Enforces very low (<64k) memory constraints.",
"default": 0,
"type": "i"
},
"memoryBase": {
"category": "Linking",
"description": "Sets the start offset of emitted memory segments.",
"type": "i",
"default": 0
},
"tableBase": {
"category": "Linking",
"description": "Sets the start offset of emitted table elements.",
"type": "i",
"default": 0
},
"transform": {
"category": "API",
"description": "Specifies the path to a custom transform to load.",
"type": "S",
"isPath": true,
"useNodeResolution": true
},
"trapMode": {
"category": "Binaryen",
"description": [
"Sets the trap mode to use.",
"",
" allow Allow trapping operations. This is the default.",
" clamp Replace trapping operations with clamping semantics.",
" js Replace trapping operations with JS semantics.",
""
],
"type": "s",
"default": "allow"
},
"runPasses": {
"category": "Binaryen",
"description": [
"Specifies additional Binaryen passes to run after other",
"optimizations, if any. See: Binaryen/src/passes/pass.cpp"
],
"type": "s"
},
"noValidate": {
"category": "Binaryen",
"description": "Skips validating the module using Binaryen.",
"type": "b",
"default": false
},
"baseDir": {
"description": "Specifies the base directory of input and output files.",
"type": "s",
"default": "."
},
"noColors": {
"description": "Disables terminal colors.",
"type": "b",
"default": false
},
"noUnsafe": {
"description": [
"Disallows the use of unsafe features in user code.",
"Does not affect library files and external modules."
],
"type": "b",
"default": false
},
"disableWarning": {
"description": [
"Disables warnings matching the given diagnostic code.",
"If no diagnostic code is given, all warnings are disabled."
],
"type": "I"
},
"noEmit": {
"description": "Performs compilation as usual but does not emit code.",
"type": "b",
"default": false
},
"showConfig": {
"description": "Print computed compiler options and exit.",
"type": "b",
"default": false
},
"stats": {
"description": "Prints statistics on I/O and compile times.",
"type": "b",
"default": false
},
"pedantic": {
"description": "Make yourself sad for no good reason.",
"type": "b",
"default": false
},
"lib": {
"description": [
"Adds one or multiple paths to custom library components and",
"uses exports of all top-level files at this path as globals."
],
"type": "S",
"isPath": true
},
"path": {
"description": [
"Adds one or multiple paths to package resolution, similar",
"to node_modules. Prefers an 'ascMain' entry in a package's",
"package.json and falls back to an inner 'assembly/' folder."
],
"type": "S",
"isPath": true
},
"wasm": {
"description": "Uses the specified Wasm binary of the compiler.",
"type": "s"
},
" ...": {
"description": "Specifies node.js options (CLI only). See: node --help"
},
"-Os": { "value": { "optimizeLevel": 0, "shrinkLevel": 1 } },
"-Oz": { "value": { "optimizeLevel": 0, "shrinkLevel": 2 } },
"-O0": { "value": { "optimizeLevel": 0, "shrinkLevel": 0 } },
"-O1": { "value": { "optimizeLevel": 1, "shrinkLevel": 0 } },
"-O2": { "value": { "optimizeLevel": 2, "shrinkLevel": 0 } },
"-O3": { "value": { "optimizeLevel": 3, "shrinkLevel": 0 } },
"-O0s": { "value": { "optimizeLevel": 0, "shrinkLevel": 1 } },
"-O1s": { "value": { "optimizeLevel": 1, "shrinkLevel": 1 } },
"-O2s": { "value": { "optimizeLevel": 2, "shrinkLevel": 1 } },
"-O3s": { "value": { "optimizeLevel": 3, "shrinkLevel": 1 } },
"-O0z": { "value": { "optimizeLevel": 0, "shrinkLevel": 2 } },
"-O1z": { "value": { "optimizeLevel": 1, "shrinkLevel": 2 } },
"-O2z": { "value": { "optimizeLevel": 2, "shrinkLevel": 2 } },
"-O3z": { "value": { "optimizeLevel": 3, "shrinkLevel": 2 } },
"-Ospeed": { "value": { "optimizeLevel": 3, "shrinkLevel": 0 } },
"-Osize": { "value": { "optimizeLevel": 0, "shrinkLevel": 2, "converge": true } },
"--measure": { "value": { "stats": true } }
}