# scala-native/scala-native

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/scala-native-scala-native).**

4,670 stars · 388 forks · Scala · NOASSERTION

## Links

- GitHub: https://github.com/scala-native/scala-native
- Homepage: http://scala-native.org
- awesome-repositories: https://awesome-repositories.com/repository/scala-native-scala-native.md

## Topics

`aot` `compiler` `llvm` `native` `scala` `scala-native`

## Description

Scala Native is an ahead-of-time compiler that transforms Scala source code into standalone native binaries for direct execution on hardware. It provides a native binary toolchain designed to eliminate virtual machine warm-up times and ensure instant startup by compiling code into optimized executables.

The project features a C interoperability interface and foreign function interface that map native C headers to language objects, allowing for the direct execution of external libraries. It includes a low-level memory manager that supports direct pointer manipulation and the use of structs for precise control over memory layout.

The system utilizes LLVM-based compilation and static binary linking to bundle runtime components into a single file. It balances low-level hardware access with automatic garbage-collected memory management for bare metal application development.

## Tags

### Programming Languages & Runtimes

- [Ahead-Of-Time Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-toolchains/execution-mode-engines/ahead-of-time-kernel-compilation/ahead-of-time-compilers.md) — Compiles Scala source code into standalone machine-executable binaries to eliminate virtual machine warm-up times. ([source](https://www.scala-native.org/))
- [Binary Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/binary-compilation.md) — Transforms Scala source code into standalone executable binary units for direct execution on hardware. ([source](https://scala-native.org/))
- [Scala-to-C Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/c-and-c-cross-compilation/c-and-objective-c-interface-mapping/scala-to-c-interfaces.md) — Provides a specialized mechanism for calling C functions and linking native libraries directly from Scala.
- [Garbage-Collected Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/garbage-collected-runtimes.md) — Includes a runtime integrated into the native binary that provides automatic garbage-collected memory management.
- [Native C Interoperability](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/native-c-interoperability.md) — Provides the necessary infrastructure to link and interface with existing C binary libraries.
- [C Function Bindings](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/native-c-interoperability/c-function-bindings.md) — Provides a foreign function interface for mapping native C functions to language methods for direct execution.
- [LLVM-Based Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/llvm-based-compilers.md) — Utilizes the LLVM toolchain as a backend to generate optimized machine code for multiple hardware targets.
- [Managed-to-Native Function Calls](https://awesome-repositories.com/f/programming-languages-runtimes/native-call-synchronization/managed-to-native-function-calls.md) — Enables invoking native library functions from managed Scala code through data marshalling and platform invoke declarations. ([source](https://www.scala-native.org/))

### Development Tools & Productivity

- [Native Binary Toolchains](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-automation-systems/build-systems/binary-compilation-toolchains/native-binary-toolchains.md) — Provides a comprehensive toolchain for compiling Scala code into platform-specific native binaries.
- [Native AOT Compilation](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/native-aot-compilation.md) — Converts high-level Scala code directly into native machine instructions to optimize startup and memory usage.
- [Standalone Binaries](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/native-aot-compilation/standalone-binaries.md) — Generates single-file executable binaries that include both the runtime and application code for instant startup.
- [Static Binaries](https://awesome-repositories.com/f/development-tools-productivity/static-binaries.md) — Bundles all runtime components and dependencies into a single, self-contained executable file.

### Operating Systems & Systems Programming

- [Low-Level System Operations](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/memory-allocation-libraries/low-level-system-operations.md) — Allows direct access to raw memory pointers and uninitialized memory for performance-critical system tasks.
- [Low-Level Systems Programming](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/memory-allocation-libraries/low-level-systems-programming.md) — Provides direct control over memory layout using pointers and structs for high-performance systems programming. ([source](https://www.scala-native.org/))
- [Bare Metal Development](https://awesome-repositories.com/f/operating-systems-systems-programming/systems-programming/bare-metal-development.md) — Enables the development of high-performance software that executes directly on hardware without a virtual machine.

### Software Engineering & Architecture

- [Memory Manipulation](https://awesome-repositories.com/f/software-engineering-architecture/integer-arithmetic/pointer-arithmetic/memory-manipulation.md) — Enables direct memory access and manual control over memory addresses and offsets via low-level primitives.
