v2025.7.0
All Bundles

Runtime

Provides access to runtime system

Operations

Assert

Asserts runtime value to be true. If false, program exits with stack trace.

function : Assert(assert:Bool) ~ Nil

Parameters

NameTypeDescription
assertBoolvalue to assert

Command

Executes a system command

function : Command(c:System.String) ~ Int

Parameters

NameTypeDescription
cStringsystem command

Return

TypeDescription
Intcommand status code

CommandOutput

Executes a system command

function : CommandOutput(c:System.String) ~ CommandOutput

Parameters

NameTypeDescription
cStringsystem command

Return

TypeDescription
CommandOutputoutput from command

CommandOutput

Executes a system command

function : CommandOutput(c:System.String, e:String[]) ~ CommandOutput

Parameters

NameTypeDescription
cStringsystem command
eStringarray of environment variables

Return

TypeDescription
CommandOutputoutput from command

Copy

Copies data between two byte arrays

function : Copy(dest:Byte[], dest_offset:Int, src:Byte[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destBytedestination array
dest_offsetIntdestination array copy offset
srcBytesource array
src_offsetIntsource array copy offset
lenIntnumber of bytes to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Copy

Copies data between two character arrays

function : Copy(dest:Char[], dest_offset:Int, src:Char[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destChardestination array
dest_offsetIntdestination array copy offset
srcCharsource array
src_offsetIntsource array copy offset
lenIntnumber of characters to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Copy

Copies data between two integer arrays

function : Copy(dest:Int[], dest_offset:Int, src:Int[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destIntdestination array
dest_offsetIntdestination array copy offset
srcIntsource array
src_offsetIntsource array copy offset
lenIntnumber of values to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Copy

Copies data between two Base arrays

function : Copy(dest:Base[], dest_offset:Int, src:Base[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destBasedestination array
dest_offsetIntdestination array copy offset
srcBasesource array
src_offsetIntsource array copy offset
lenIntnumber of values to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Copy

Copies data between two Compare arrays

function : Copy(dest:Compare[], dest_offset:Int, src:Compare[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destComparedestination array
dest_offsetIntdestination array copy offset
srcComparesource array
src_offsetIntsource array copy offset
lenIntnumber of values to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Copy

Copies data between two float arrays

function : Copy(dest:Float[], dest_offset:Int, src:Float[], src_offset:Int, len:Int) ~ Bool

Parameters

NameTypeDescription
destFloatdestination array
dest_offsetIntdestination array copy offset
srcFloatsource array
src_offsetIntsource array copy offset
lenIntnumber of values to copy

Return

TypeDescription
Booltrue if successful, false otherwise

Exit

Causes the executing program to halt

function : Exit(code:Int) ~ Nil

Parameters

NameTypeDescription
codeIntexit code

GetEnvironmentVariable

Fetches a runtime environment variable.

function : GetEnvironmentVariable(key:String) ~ String

Parameters

NameTypeDescription
keyStringvariable key

Return

TypeDescription
Stringruntime environment variable

GetInstallDir

Returns the installation directory

function : GetInstallDir() ~ String

Return

TypeDescription
Stringinstallation directory

GetPlatform

Returns an OS platform string

function : GetPlatform() ~ String

Return

TypeDescription
StringOS platform string

GetProperty

Fetches a runtime property. System properties include: 'user_dir', temp_dir and 'install_dir'.

function : GetProperty(key:String) ~ String

Parameters

NameTypeDescription
keyStringproperty key

Return

TypeDescription
Stringruntime property

GetTempDir

Returns the system's temporary directory

function : GetTempDir() ~ String

Return

TypeDescription
Stringsystem's temporary directory

GetTime

Returns the current time

function : GetTime(gmt:Bool) ~ Time.Date

Parameters

NameTypeDescription
gmtBooltrue of time is in GMT, false for local time zone

Return

TypeDescription
Time.Datecurrent time

GetUserDir

Returns the current user's working directory

function : GetUserDir() ~ String

Return

TypeDescription
Stringcurrent user's working directory

GetVersion

Returns the package version string

function : GetVersion() ~ String

Return

TypeDescription
Stringpackage version string

HasEnvironmentVariable

Checks if an environment variable exists

function : HasEnvironmentVariable(key:String) ~ Bool

Parameters

NameTypeDescription
keyStringvariable key

Return

TypeDescription
Booltrue if it exists, false otherwise

HasProperty

Checks if a property exists

function : HasProperty(key:String) ~ Bool

Parameters

NameTypeDescription
keyStringproperty key

Return

TypeDescription
Booltrue if it exists, false otherwise

RaiseSignal

Raises a system signal

function : RaiseSignal(type:Runtime->Signal) ~ Nil

Parameters

NameTypeDescription
typeRuntime->Signalsignal type

SetEnvironmentVariable

Sets a runtime environment variable

function : SetEnvironmentVariable(key:String, value:String) ~ Nil

Parameters

NameTypeDescription
keyStringvariable key
valueStringenvironment value

SetLocale

Sets the runtime locale

function : SetLocale(locale:String) ~ Nil

Parameters

NameTypeDescription
localeStringlocale string

SetProperty

Sets a runtime property

function : SetProperty(key:String, value:String) ~ Nil

Parameters

NameTypeDescription
keyStringproperty key
valueStringproperty value

SetSignal

Sets a system signal

function : SetSignal(type:Runtime->Signal, func:(Int)~Nil) ~ Nil

Parameters

NameTypeDescription
typeRuntime->Signalsignal type
func(Int)~Nilfunction handler for signal