> For the complete documentation index, see [llms.txt](https://windows96.gitbook.io/dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://windows96.gitbook.io/dev-docs/wrt/introduction.md).

# Introduction

![The logo used for WRT, derived from the JavaScript logo](/files/-Mg9GYHmp7A2hnXJOck_)

WRT (which stands for Windows 96 RunTime) is the JavaScript execution environment for Windows 96 scripts. All script files are ran under WRT unless explicitly told not to do so.

If this sounds confusing, there is no need to panic - its all seamless and completely transparent to the user.

## How is WRT different from `eval` based execution?

Scripts running under WRT are:

* ran in their own scope to prevent global namespace pollution
* designed to efficiently handle resources such as `Blobs` when the correct paradigm is used.
* able to create dependencies using `await include("my_script.js")`, which follows the CommonJS format with some twists.
* able to identify the environment from which they are executed (terminal, GUI, etc.)
* asynchronous by default

## Aliased functions and objects

WRT aliases the most common functions/objects in Windows 96 but also aliases functions/objects available to a script running under WRT. These are:

* `current` - the [WRTParameters ](/dev-docs/wrt/api-reference/wrtparameters.md)that were used to start the script.
* `FS` - an alias for `w96.FS`, the object used to interact with the file system.
* `FSUtil` - an alias for `w96.FSUtil`, an object used to store file system utility functions.
* `env` - an alias for `current.env`.
* `WApplication` - an alias for `w96.WApplication`, a class used to write structured applications.
* `StandardWindow` - an alias for `w96.StandardWindow`, a class used to construct GUI windows.
* `registerApp` - an alias for `w96.sys.reg.registerApp`, a function used to register applications.
* `deregisterApp` - an alias for `w96.sys.reg.deregisterApp`, a function used to deregister applications.

## To WRT or not to WRT?

That depends on your use case.

If you're creating an application or some kind of library, you should be using WRT. The overhead is minimal and it provides a lot back for the developer (e.g. automatic handling of scope, dependencies, as mentioned before).

If you wish to have more control or simply don't want the additional features, you may want to use an `eval` based script.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://windows96.gitbook.io/dev-docs/wrt/introduction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
