“Compile time” (when source code is translated into machine-readable code), “link time” (when various code components and libraries are brought together), “runtime” is refers to the period during which a program is actively executing on a computer.
Beyond just the “time,” “runtime” also commonly refers to the runtime environment or runtime system.
To understand runtime more clearly, it’s helpful to distinguish between its operational and application levels: At the operational level, runtime encompasses the entire environment that supports the execution of software on a system. This includes the operating system (OS), system libraries, hardware resources (CPU, memory, storage, network), and other foundational software. The OS (e.g., Windows, Linux, macOS) is the primary operational runtime. It boots up, loads drivers, and then allows you to launch applications.
At the application level, runtime refers to the specific environment and supporting components that a particular application needs to execute. This is often a more abstract layer built on top of the operational runtime. This typically includes language-specific runtime systems (like the Java Virtual Machine for Java, Node.js for JavaScript, or the .NET Common Language Runtime), application-specific libraries, frameworks, and any configuration specific to that application. The application runtime provides a consistent and often platform-independent environment for the application code. It handles language-specific tasks like garbage collection, exception handling, dynamic linking of libraries, and sometimes Just-In-Time (JIT) compilation. It allows developers to write code that can run without needing to explicitly manage low-level hardware interactions.
Compiled Runtimes (Native Code): C, C++, Rust and Go, Source code is fully translated into machine-specific executable code before runtime. The program then executes directly on the hardware, with minimal runtime support beyond the operating system’s basic services and standard libraries.
Virtual Machine (VM) Runtimes (Intermediate Bytecode): Java (JVM), C# (.NET CLR), Scala, Kotlin, older versions of Python (CPython compiles to bytecode, then interprets it). Source code is first compiled into an intermediate bytecode (not direct machine code) that is then executed by a virtual machine. This VM can either interpret the bytecode or use Just-In-Time (JIT) compilation to translate it into machine code during execution.
Interpreted Runtimes: Python, JavaScript (historically, though modern JavaScript engines often use JIT compilation), Ruby, PHP. The source code is read and executed line by line by an interpreter program at runtime, without a prior compilation step into machine code.
Hybrid Runtimes.