Scala Native, which brings the Scala language closer to bare metal by leveraging LLVM compiler infrastructure, has been released, expanding opportunities for the platform on smaller devices.
The project, which features an optimizing ahead-of-time compiler, has reached feature-completeness, said Denys Shabalin, who has been in charge of Scala Native. Unlike the reference implementation of Scala, which generates bytecode to run on top of the Java Virtual Machine, the Scala Native toolchain produces stand-alone native executables. Shabalin noted that "this opens the door for Scala to be used in environments where [a] full-blown virtual machine is usually an overkill: command-line tools, resource-constrained hardware applications, video games, etc."
Scala Native's key is the compiler generating LLVM intermediate representation, used to produce efficient platform-dependent machine code. The project also features a lightweight managed runtime and support for the entire Scala language with "neglible" semantic differences, Shabalin said. The 0.1 release offered this week supports existing Scala IDEs and integrates with the sbt build tool, and the core subset of JDK base libraries is supported as well.