Skip to main content

Class: Runtime

Core singleton representing an instance of the Rust Core SDK

Use install in order to customize the server connection options or other global process options.

Properties​

logger​

readonly logger: Logger


metricMeter​

readonly metricMeter: MetricMeter

The metric meter associated with this runtime.


metricsBuffer​

readonly metricsBuffer: MetricsBuffer | undefined

Experimental

The metrics buffer associated with this runtime, if buffered metrics are enabled.

Buffered metrics is an experimental feature. APIs may be subject to change.


native​

readonly native: Runtime


options​

readonly options: CompiledRuntimeOptions


_instance?​

static optional _instance?: Runtime


defaultOptions​

static defaultOptions: RuntimeOptions

Default options get overridden when Core is installed and are remembered in case Core is re-instantiated after being shut down


instantiator?​

static optional instantiator?: "install" | "instance"

Methods​

flushLogs()​

flushLogs(): void

Flush any buffered logs.

Returns​

void


install()​

static install(options): Runtime

Instantiate a new Core object and set it as the singleton instance

If Core has already been instantiated with instance or this method, will throw a IllegalStateError.

Parameters​

options​

RuntimeOptions

Returns​

Runtime


instance()​

static instance(): Runtime

Get or instantiate the singleton Core object

If Core has not been instantiated with install or this method, a new Core instance will be installed and configured to connect to a local server.

Returns​

Runtime