TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CryZe/asr-assemblyscript/llms.txt
Use this file to discover all available pages before exploring further.
runtime module configures the auto splitting runtime environment and provides essential debugging and introspection utilities. It controls how frequently your update() function is invoked, exposes a logging helper for development, and lets your code inspect the host operating system and CPU architecture so you can branch on platform-specific behaviour (for example, choosing between a 32-bit and 64-bit game executable).
Beyond its exported functions, this module also registers a custom abort handler that replaces AssemblyScript’s default error behaviour with an explicit WebAssembly unreachable trap. This side-effect import is required in your entry file. Without it, runtime errors may not be surfaced correctly by the LiveSplit One host.
abort handler is registered, while the namespace import gives you access to the functions below.
setTickRate
update() function. This applies globally to the runtime — it is not scoped to a single auto splitter module.
The desired number of
update() calls per second. Must be a positive value. Common choices are 60.0 (default) for responsive splitting, or lower values such as 30.0 or 10.0 to reduce CPU usage for simpler auto splitters.setTickRate affects the entire auto splitting runtime — a common default is 60 ticks per second. Lowering the rate reduces CPU usage and is recommended for auto splitters that only need to poll memory infrequently. Changes take effect on the next tick cycle.printMessage
The message string to print. Accepts any valid UTF-8 content, including interpolated values.
getOS
"" if the OS name cannot be determined.
Returns: string — the OS identifier. Example values:
| Value | Platform |
|---|---|
"windows" | Microsoft Windows |
"linux" | Linux |
"macos" | macOS / OS X |
getArch
"" if the architecture cannot be determined.
Returns: string — the architecture identifier. Example values:
| Value | Architecture |
|---|---|
"x86" | 32-bit x86 |
"x86_64" | 64-bit x86 (amd64) |
"arm" | 32-bit ARM |
"aarch64" | 64-bit ARM (Apple Silicon) |