Scala Native is an optimising ahead-of-time compiler for the Scala programming language. Traditionally, a virtual machine, the JVM, was required to run Scala programs. Scala Native taps into the compiler to emit LLVM intermediate representation rather than JVM bytecode. Then, the LLVM compiler infrastructure is used to produce native libraries and executables. Given that Scala Native executables are stand-alone programs, they generally have a shorter start-up time and low memory consumption. This opens up new avenues to deploy Scala programs where previously the virtual machine would be the limiting factor. For example, developers could write programs for the command line or embedded devices.
- Tutorials and Examples
- Build Tools
- Functional Programming
- Unit Tests
- File Formats and Parsers
- Web Development
Tutorials and Examples
- Giter8 template for a minimal Scala Native project - Official Giter8 template for a minimal Scala Native project.
- Hands on Scala Native - Tutorial for implementing a bandwidth monitor with Ncurses.
- Starter for Scala Native - Scala Native project that links to a custom C library.
- Building C code using sbt-jni - Example for compiling C code in a Scala Native project using sbt-jni.
- Example project with external dependencies - Example project that uses external dependencies to generate HTML and run a test suite.
- sbt - Scala's standard build tool.
- Mill - Build tool striving for simplicity, inspired by Bazel.
- Bloop - Scala build server and command-line tool for fast developer workflows.
- Seed - Build tool based on Bloop. Focuses on user experience and cross-platform builds, inspired by Cargo.
- Shapeless - Library for generic programming.
- Squants - DSL for quantities, units of measure and dimensional analysis.
- scalaz - Type classes and instances for data structures.
- nobox - Immutable primitive array wrapper without boxing.
- PPrint - Pretty-print values and types.
- SourceCode - Implicits providing meta data similar to
- reactify - Functional Reactive Programming framework for Scala.
- chimney - Boilerplate-free data transformations.
- utest - Library for unit tests.
- minitest - Lightweight testing library.
- scalaprops - Library for property-based testing.
- Makeshift - Library for unit tests.
- cmark - Bindings for the cmark CommonMark parser library.
- libuv - Bindings for libuv, a library for asynchronous I/O.
- SDL2 and OpenGL - Bindings for the graphical frameworks SDL2 and OpenGL.
- Cocoa - Bindings for the macOS graphical framework Cocoa.
- GNU Scientific Library - Bindings for GNU Scientific Library (GSL).
- BLAS - Bindings for BLAS, a library for Linear Algebra.
- Gtk+ - Bindings for the GTK+ graphical toolkit.
- libsoup - Bindings for the libsoup HTTP client/server library.
- libui - GUI framework based on libui.
File Formats and Parsers
- msgpack4z - Implementation of MessagePack, a binary serialisation format.
- FastParse - Library for defining and running parsers.
- scalatags - HTML/XML construction and rendering.
- Pine - HTML/XML parsing, manipulation and rendering.
- scala-json - JSON parser.
- toml-scala - TOML parser with codec derivation.
- argonaut - Purely functional JSON parser and library.
- ScalaPB - Protocol Buffer compiler for Scala.
- sconfig - HOCON parser.
- Trail - Routing library.
- scribe - Fast and simple logging library.
- slogging - Typesafe-logging and SLF4J-compatible logging library based on macros.
- fansi - Library for creating ANSI-coloured strings.
- scopt - Command-line argument parser.
- scala-optparse-applicative - Port of Haskell's CLI argument parsing library optparse-applicative.
- scallop - A simple Scala CLI parsing library.
- Potassium - Framework for writing robot software.
- WPILib - Reimplementation of the FIRST Robotics WPILib libraries.
- sglgears - Port of GL gears.c.
- k8s-cli - CLI tools to generate Kubernetes resources for Akka, Play Framework and Lagom-based applications.
- Coursier - Coursier's
bootstrapcommand generates native launchers.
- Seed Docker image - Docker image for cross-platform builds with Seed.
- scala-native-sbt-docker - Docker image for Scala Native and sbt.
This work is licenced under a Creative Commons Attribution 4.0 International Licence.