sbt-native-packager
sbt Native Packager (by sbt)
sbt-native-image
Plugin to generate native-image binaries with sbt (by scalameta)
Our great sponsors
sbt-native-packager | sbt-native-image | |
---|---|---|
3 | 5 | |
1,557 | 223 | |
0.1% | 1.3% | |
4.2 | 0.0 | |
28 days ago | 19 days ago | |
Scala | Scala | |
BSD 2-clause "Simplified" License | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sbt-native-packager
Posts with mentions or reviews of sbt-native-packager.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-25.
-
I removed sbt-assembly and sbt-buildinfo from my project.
You should use sbt-jib. (You shouldn't use sbt-native-packager either, it doesn't work well in this regard: [1], [2].)
-
SBT error when running package application: java.lang.RuntimeException: No main class detected.
IMO don't take any of this advice and use https://github.com/sbt/sbt-native-packager
sbt-native-image
Posts with mentions or reviews of sbt-native-image.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-13.
-
Scala.js AWS Lambda, using Scala 3
Take a look at sbt-native-image or sbt-native-packager for building the native image.
-
GraalVM native-image with Scala 3 reflection hell
The reason seems to be Scala 3's new encoding for lazy vals, where a reflective access to a variable called bitmap takes place. To demonstrate this, I took the http4s g8 template, set it up with Scala 3.1.0, added sbt native-image, started the nativeImageRunAgent and ran a single request against GET /joke. After stopping the server, the native-image run agent generated the reflective configs that are required for this path of execution. Comparing the generated Scala 2.13 with the Scala 3 configs, yields a bloated version for Scala 3 that contains these additional rules:
-
Is Scala and Play Framework dying?
Sbt plugin: https://github.com/scalameta/sbt-native-image
-
Native Image Compilation for A Purely Functional Example Application
IIRC, the sbt-native-image plugin can abstract that away, too: https://github.com/scalameta/sbt-native-image#nativeimagerunagent https://github.com/scalameta/sbt-native-image
-
SBT error when running package application: java.lang.RuntimeException: No main class detected.
Assembly, however, has some disadvantages so you may also want to look into other alternatives like sbt-native-packager. You may even want to produce a binary using sbt-native-image (which uses GraalVM under the hood) so your users do not need to install anything at all, not even a JRE.
What are some alternatives?
When comparing sbt-native-packager and sbt-native-image you can also consider the following projects:
sbt-assembly - Deploy über-JARs. Restart processes. (port of codahale/assembly-sbt)
sbt-pack - A sbt plugin for creating distributable Scala packages.
coursier - Pure Scala Artifact Fetching
sbt-jni - SBT Plugin to ease working with JNI
xsbt-web-plugin - Servlet support for sbt
sbt-release - A release plugin for sbt
ScalaKata2 - Interactive Playground
sbt-docker - Create Docker images directly from sbt
sbt-buildinfo - I know this because build.sbt knows this.
sbt-sonatype - A sbt plugin for publishing Scala/Java projects to the Maven central.
sbt-play-scalajs - SBT plugin to use Scala.js along with any sbt-web server.
sbt-header - sbt-header is an sbt plugin for creating file headers, e.g. copyright headers