Skip to main content

Module environment

Module environment 

Source
Expand description

Where code runs.

An implementation does not run in a language, it runs in an environment: a browser, a Node process, a Python interpreter, this Rust process, a WebAssembly sandbox, something already running on another machine. The language says what the code is written in; the environment says where it executes and what else is available to it there.

Keeping the two apart matters because the same code can run in more than one place. A Python implementation might be reached by starting an interpreter, or by asking one that is already running, or by loading CPython compiled to WebAssembly. Same proof, same language, three ways of getting to it — and nothing about the proof changes.

§How an environment comes to hold anything

An environment loads a module, and the module registers as an execution source: it announces which propositions it can prove and how to reach each one. Nothing is discovered by scanning or convention. That is why a program embedding this can be a standalone binary or a library inside someone else’s application without either arrangement being a special case — in both, some module said what it could do.

Structs§

Environment
A place implementations run.

Enums§

Reach
How this process gets to an environment.