Application Configuration

Tune the application behavior through these global variables.

Debug Configuration

NameTypeExplain

DEBUG

boolean

When DEBUG is set to true, more information will be logged into console to help debug.

DEBUG_DUMP_MEM

boolean

When DEBUG_DUMP_MEM is set to true, the heap memory (as an array buffer) will be dumped to the console when VM initializes.

DEBUG_DUMP_STEP

boolean

When DEBUG_DUMP_STEP is set to true, the VM will log state information to console on each step of execution.

Heap Memory Configuration

NameTypeExplain

MEM_POOL_SIZE

number

Size of heap memory, in bytes

MEM_POOL_DEFAULT_SIZE

number

Default size of heap memory, in bytes

MEM_POOL_MAX_SIZE

number

Maximum allowed size of heap memory, in bytes

MEM_POOL_MIN_SIZE

number

Minimum allowed size of heap memory, in bytes

MEM_BLOCK_MAX_SIZE

number

Maximum size of a memory block (alloc or alloc_array)allowed, in bytes

C0 Runtime Configuration

NameTypeExplain

C0_MAX_RECURSION

number

Maximum call stack depth allowed. If exceeded, the c0_memory_error will be thrown.

Compiler Configuration

NameTypeExplain

COMPILER_BACKEND_URL

string

The remote network URL for backend compile API.

UI Configuration

NameTypeExplain

UI_EDITOR_THEME

"light" | "dark"

Theme of Code Mirror code editor (both C0 and BC0 editor)

UI_ERR_DISPLAY_TIME_SEC

number

The amount of time an error message will display (in sec)

UI_WARN_DISPLAY_TIME_SEC

number

The amount of time a warning message will display (in sec)

UI_OK_DISPLAY_TIME_SEC

number

The amount of time an OK message will display (in sec)

Experimental Features

NameTypeExplain

EXP_PRESERVE_TYPE

boolean

Preserve the typeRecord or not on restarting C0VM.

Last updated