Main article at
The .NET compiler is a crucial component of the : At runtime, the : IL code, along with metadata and other resources, is packaged into an assembly. Assemblies are the building blocks of .NET applications and can be either executables (.exe) or libraries (.dll).
Some Useful links:
: The common type system defines how types are declared, used, and managed in the common language runtime, and is also an important part of the runtime's support for cross-language integration.
: The following articles show the various ways of doing "native interoperability" in .NET.
So, why we should choose and use .NET? see : What is the Java Runtime Environment (JRE)?
: Let’s take a closer look at JDK, JRE, and JVM to understand the function of each.
Kotlin Compiler
The Kotlin compiler, known as kotlinc, is a tool that translates Kotlin source code into bytecode that can be executed on the Java Virtual Machine (JVM). It can also compile Kotlin code to JavaScript or native binaries, allowing Kotlin to be used in a wide range of platforms and applications.
Ahead-Of-Time (AOT) Compilation
Ahead-Of-Time (AOT) compilation is a technique where the source code is compiled into native machine code before it is executed. Unlike Just-In-Time (JIT) compilation, where code is compiled at runtime, AOT compilation translates the entire codebase into a standalone executable during the build process. This approach has several advantages, particularly in terms of performance and startup time.
Key Points about AOT:
Faster Startup: Since the code is already compiled to native machine code, the application can start faster compared to JIT (Just-In-Time) compilation.
Reduced Runtime Overhead: AOT eliminates the need for runtime compilation, reducing the overhead during execution.
Smaller Footprint: The resulting native executable is typically smaller and more efficient.
GraalVM: Kotlin can leverage GraalVM for AOT compilation, which provides advanced optimizations and performance improvements.
| Language | AOT Compilation Tool/Technology | Description | Official Link | |
|---|---|---|---|---|
| Java | GraalVM | High-performance runtime that provides AOT compilation, enabling Java applications to be compiled to native code | ||
| ReadyToRun (R2R) | Compiles .NET assemblies ahead of time to improve startup performance | |||
| GraalVM | Provides AOT compilation for Kotlin, enabling the creation of native executables from Kotlin code | , | ||
| Standard Class Library | Java Standard Class Library (JCL) | .NET Standard Class Library (BCL) | Kotlin Standard Library | , , |
| Runtime Environment | Java Runtime Environment (JRE) | .NET Runtime | Kotlin Runtime | , , |
| Documentation Generator | Java Documentation Generator (javadoc) | XML Documentation Comments | Kotlin Documentation Comments (KDoc) | , , |
| Debugger | Java Debugger (jdb) | Visual Studio Debugger | Kotlin Debugger (kotlin-debugger) | , , |
| Process Status Tool | Java Process Status Tool (jps) | Process Explorer | Kotlin Process Status Tool | , , |
| Stack Trace | Java Stack Trace (jstack) | Exception Stack Trace | Kotlin Stack Trace | , , |
| Interactive Shell | Java Shell (jshell) | Interactive C# REPL (csi) | Kotlin REPL (kotlin-repl) | , , |
| Native Interface | Java Native Interface (JNI) | Platform Invocation Services (P/Invoke) | Kotlin Native Interface (KNI) | , , , , Maven |
REPL: Stands for Read-Eval-Print Loop
SOCIAL SHARE CARD GENERATOR