---
title: "runtime(): function in Runtime, TypeShade API reference"
description: "runtime, a function in Runtime. The default runtime: the one configure named, or one on the device the call layer uses…"
url: https://typeshade.dev/api/runtime/
language: en
---

# `runtime()`

Function in Runtime

The default runtime: the one configure named, or one on the device the call layer uses, so a resource made on either layer is used on the other.

`import { runtime } from 'typeshade/runtime'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
function runtime(): Promise<Runtime>
```

## Return value

`Promise<Runtime>`

## Description

Where there is no WebGPU, one on the call layer’s WebGL2 context (change 0054); rejects where there is neither.

## In the guide

- [Language guide](https://typeshade.dev/guide/internals/)
- [Emitting and reflection](https://typeshade.dev/guide/internals/emitting-and-reflection/)
- [Capabilities & extensions](https://typeshade.dev/guide/internals/capabilities-extensions/)

## Source

[`src/runtime/runtime.ts`, line 726](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/runtime.ts#L726), at commit af54ddad5
