Remove the start decorator in favor of a command line option

This commit is contained in:
dcode
2019-06-05 18:52:04 +02:00
parent dfe04d08e4
commit eaea26b7ae
44 changed files with 3676 additions and 3228 deletions

View File

@ -100,6 +100,9 @@ Besides demangling classes exported from your entry file to a handy object struc
var value = module.F64[ptr >>> 3];
```
* **__start**(): `void`<br />
Explicit start function if the `--explicit-start` option is used. Must be called before any other exports if present.
* **__allocString**(str: `string`): `number`<br />
Allocates a new string in the module's memory and returns a reference (pointer) to it.

View File

@ -43,6 +43,8 @@ interface ASUtil {
readonly F32: Float32Array;
/** A 64-bit float view on the memory. */
readonly F64: Float64Array;
/** Explicit start function, if requested. */
__start(): void;
/** Allocates a new string in the module's memory and returns a reference (pointer) to it. */
__allocString(str: string): number;
/** Reads (copies) the value of a string from the module's memory. */