Skip to content

Scala Native

Awesome Scala Native Awesome

Scala Native

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

  • 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.

Functional Programming

  • 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 __LINE__ in C.
  • reactify - Functional Reactive Programming framework for Scala.
  • chimney - Boilerplate-free data transformations.
  • Quicklens - Modify deeply nested case class fields.
  • Cats - Abstractions for functional programming in Scala.

Unit Tests

Bindings

File Formats and Parsers

Databases

  • JDBC - Port of the database access layer JDBC to Scala Native.
  • SQLite4S - Port of the Java library Sqlite4java. Includes bindings for the SQLite native library.
  • libpq4s - Scala wrapper around the async PostgreSQL C library libpq.

Web Development

  • Trail - Routing library.
  • sttp - HTTP Client library.
  • snunit - Scala Native HTTP server based on NGINX Unit.

Concurrency

  • scala-native-loop - Event loop and async-oriented IO for Scala Native
  • castor - Lightweight, typed Actor library for Scala.

Logging

Console

Robotics

Programs

Infrastructure

Licence

Creative Commons Licence
This work is licenced under a Creative Commons Attribution 4.0 International Licence.