Short answer
A runtime is the software layer that executes a program and gives it a way to reach the outside world. In JavaScript, MDN splits that layer into an engine, which runs the language, and a host, such as the browser or Node.js. In Python, CPython compiles source to bytecode and a virtual machine runs that bytecode. The runtime is not the source file and not the editor.
Last verified against the sources listed below.
Key takeaways
- JavaScript needs an engine plus a host. The browser DOM and Node.js are two hosts.
- Node.js calls itself an asynchronous, event-driven JavaScript runtime for network apps.
- CPython compiles to bytecode, caches .pyc files, and runs that bytecode on a virtual machine.
- A Vue runtime-only build omits the template compiler. The full build includes it and is about 14kb larger.
- No speed ranking belongs here. These pages do not publish a benchmark between runtimes.
What is a runtime? It is the layer that actually runs a program: the engine or virtual machine, plus the surroundings that let the program read, write, and respond.
The source file is the recipe. The runtime is what carries it out.
Two public docs draw the picture without a speed contest. MDN describes JavaScript as an engine plus a host.
Python’s glossary describes bytecode on a virtual machine. This article stays inside those pages.
What does the runtime include?
It includes the piece that executes the language and the piece that connects that execution to the rest of the computer.
MDN’s execution model says JavaScript needs an engine and a host environment. The engine implements the language: it takes source, parses it, and executes it. The host supplies what the language alone cannot do, such as output, external resources, and security limits.
The HTML DOM is the host in a browser. Node.js is a host for the server.
The same page says each agent keeps a heap of objects, a queue of jobs, and a stack of execution contexts. The queue is the event loop in HTML terms. The stack is the call stack.
A job starts by pushing a frame and ends when the stack is empty. That structure is the runtime’s bookkeeping, not a library you import for ordinary page scripts.
How does Node.js describe itself?
Node.js describes itself as a JavaScript runtime aimed at network applications, with the event loop built in rather than called as a library.
The Node.js about page says it is asynchronous and event-driven, so many connections can be in flight and the process sleeps when there is nothing to do. It contrasts that with a model that uses an operating-system thread per connection. It also says almost no function in Node.js performs I/O directly, except synchronous methods in the standard library.
After the input script runs, Node enters the event loop. It exits when no callbacks remain. The page says this is like browser JavaScript, where the loop is hidden.
HTTP is a first-class part of the design. Child processes, through child_process.fork() and the cluster module, are how that page says you use more than one core. That is a process story, not a second browser.
MDN’s Node.js glossary matches the runtime label: a cross-platform JavaScript runtime environment for server-side and network applications. npm ships beside it. Packages come from the registry at registry.npmjs.org unless you point the client elsewhere.
What is the Python virtual machine?
It is the software machine that runs CPython bytecode after the source has been compiled.
The Python 3.15.2 glossary says source is compiled to bytecode, cached in .pyc files so a second run can skip that compile. Bytecode is an intermediate language on a virtual machine that executes the machine code for each bytecode. It is not portable across Python virtual machines, and it is not stable across releases.
The glossary’s own virtual machine entry says Python’s virtual machine executes the bytecode the compiler emitted.
CPython is the canonical implementation distributed on python.org. The name is used when you must separate it from other implementations such as Jython or IronPython. The interpreted entry says source can run without a separate step that produces an executable you then launch, because the bytecode compiler is already there.
The same entry says interpreted programs generally run more slowly than compiled ones. It does not publish a multiplier, so this guide will not invent one.
| Runtime piece | Where it is documented | What it runs |
|---|---|---|
| JavaScript engine | MDN engine glossary | JavaScript source, often via JIT to machine code |
| Browser host | MDN execution model | DOM and other web platform objects around the engine |
| Node.js | Node about page and MDN glossary | JavaScript for servers and network apps, with an event loop |
| CPython virtual machine | Python glossary | Bytecode compiled from Python source |
Where does the word runtime show up in a framework?
Vue uses runtime for a build that executes components, and it uses a different build when the compiler must travel with that runtime.
The Vue tooling page says vue.runtime.* files are runtime-only. They do not include the template compiler, so every template must be compiled ahead of time.
Full builds include the compiler, can compile in the browser, and increase the payload by about 14kb. Default tooling uses the runtime-only build because single-file components are pre-compiled.
That is a packaging choice on top of the JavaScript host. The Vue runtime-only file still needs an engine and a host before any button updates. It is not a second Python virtual machine, and it is not Node.js unless you are running the tool in Node.
What is outside the runtime?
The editor, the source file, and the package manager’s registry are not the thing that executes the program.
MDN’s JavaScript engine glossary names V8, SpiderMonkey, and JavaScriptCore, and it says some engines also run WebAssembly in the same sandbox. It tells you not to mix the JavaScript engine up with the rendering engine.
A page can be slow to paint for rendering reasons while the language runtime is a separate layer. These pages do not score one engine against another.
Python’s glossary also uses runtime for a narrower idea: a virtual environment is a cooperatively isolated runtime environment for installing packages so one application does not disturb another. That environment holds libraries. It is not the virtual machine that executes bytecode, though people shorten both ideas to the same word.
Programming paradigms describe how you organize the source. The runtime is what later executes that source.
Node.js vs Python compares two languages that each bring a runtime of the kind this article defines.
An SVG on a page still has to become something the browser host can show. The SVG to JSX converter turns an SVG into JavaScript.
A browser runtime can then run that script and paint the result. The converter does not choose Node.js or CPython for you.
Frequently asked questions
Is the runtime the same thing as the programming language?
No. The language is the set of rules for the source. The runtime is the software that carries those rules out and connects them to a machine. MDN says a JavaScript engine parses and executes the language, while the host supplies the surroundings, such as the DOM in a browser. Python's glossary calls CPython the canonical implementation and says other implementations exist, including Jython and IronPython. One language can have more than one runtime.
What is a JavaScript engine if the host is separate?
MDN's engine glossary says engines are interpreters that parse and execute JavaScript, and that modern engines use just-in-time compilation to machine code. It names V8, SpiderMonkey, and JavaScriptCore. In a browser the engine works with the rendering engine through the DOM and Web IDL. The same glossary says not to confuse the JavaScript engine with the rendering engine. Node.js is a server host, not a second name for the DOM.
Why do Python .pyc files exist?
The glossary says source is compiled to bytecode, the internal form of a program in the CPython interpreter. That bytecode is cached in .pyc files so the same file can skip compiling from source the next time. Bytecode is not expected to work between different Python virtual machines, and it is not stable between Python releases. The virtual machine is the piece that executes the machine code corresponding to each bytecode.
Does a runtime-only Vue file include the compiler?
No. Vue's tooling page says files that start with vue.runtime are runtime-only builds and do not include the template compiler. Templates must already be compiled. Builds without .runtime in the name are full builds. They include the compiler and can compile templates in the browser, and the page says they increase the payload by about 14kb. Default tooling uses the runtime-only build because single-file components are compiled first.
Is Node.js a browser?
No. MDN's Node.js glossary calls it a cross-platform JavaScript runtime for server-side and network applications. The Node about page says it presents an event loop as a runtime construct, enters that loop after the input script, and leaves it when no callbacks remain. It compares that hidden loop to browser JavaScript. HTTP is described as a first-class part of Node. The browser remains a different host.
Sources
- JavaScript execution model · MDN, 2026
- Node.js glossary · MDN, 2026
- JavaScript engine · MDN, 2026
- About Node.js · Node.js, 2026
- Python glossary · Python Software Foundation, 2026
- Vue tooling · Vue.js, 2026