I've written some code I'd like to share across a couple of ScalaNative command line tools I'm working on.
Can I generate a library (preferably static) that I can share between multiple ScalaNative console applications?
Thank you!
Starting from Scala Native 0.4.8 it can generate dynamic and static libraries.
What you need to do is add the following to your build.sbt
file.
To generate a dynamic library:
import scala.scalanative.build.BuildTarget
nativeConfig ~= {
_.withBuildTarget(BuildTarget.libraryDynamic)
}
To generate a static library:
import scala.scalanative.build.BuildTarget
nativeConfig ~= {
_.withBuildTarget(BuildTarget.libraryStatic)
}