Scala Native¶ Version: 0.5.4 Scala Native is an optimizing ahead-of-time compiler and lightweight managed runtime designed specifically for Scala. It features: Low-level primitives. import scala.scalanative.unsafe._ type Vec = CStruct3[Double, Double, Double] val vec = stackalloc[Vec]() // allocate c struct on stack def sum(vec: Ptr[Vec]): Double = return vec._1 + vec._2 + vec._3 @main def main():