From b7faa27704458b4bbb0b43b15bcb16b13e7c3c4f Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Thu, 10 Dec 2020 20:38:31 +0800 Subject: docs(std/wasi): add a basic description of Context (#8711) --- std/wasi/snapshot_preview1.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'std') diff --git a/std/wasi/snapshot_preview1.ts b/std/wasi/snapshot_preview1.ts index 7160bbee9..2ec51da88 100644 --- a/std/wasi/snapshot_preview1.ts +++ b/std/wasi/snapshot_preview1.ts @@ -285,6 +285,14 @@ export interface ContextOptions { exitOnReturn?: boolean; } +/** + * The Context class provides the environment required to run WebAssembly + * modules compiled to run with the WebAssembly System Interface. + * + * Each context represents a distinct sandboxed environment and must have its + * command-line arguments, environment variables, and pre-opened directory + * structure configured explicitly. + */ export default class Context { args: string[]; env: { [key: string]: string | undefined }; -- cgit v1.2.3