Skip to content

Compile to GraalVM native image #57

Open
@jvican

Description

@jvican

I'd like to have seed compiled to native. We're already doing this in some of the projects in Bloop (for example, the next version of the CLI will be a Scala library compiled to native) and I think it would be really exciting if this project was native, which implies less resource usage and snappier UX.

Here's the list of current dependencies:

libraryDependencies ++= Seq(
  "com.lihaoyi"           %% "fansi"          % "0.2.7",
  "io.get-coursier"       %% "coursier"       % bloopCoursierVersion,
  "io.get-coursier"       %% "coursier-cache" % bloopCoursierVersion,
  "tech.sparse"           %% "toml-scala"     % "0.2.0",
  "tech.sparse"           %% "pine"           % "0.1.4",
  "ch.epfl.scala"         %% "bloop-config"   % bloopVersion,
  "com.joefkelley"        %% "argyle"         % "1.0.0",
  "org.scalaj"            %% "scalaj-http"    % "2.4.2",
  "dev.zio"               %% "zio"            % "1.0.0-RC10-1",
  "io.circe"              %% "circe-core"     % "0.11.1",
  "commons-io"            % "commons-io"      % "2.6",
  "com.zaxxer"            % "nuprocess"       % "1.2.4",
  "org.java-websocket"    % "Java-WebSocket"  % "1.4.0",
  "org.slf4j"             % "slf4j-simple"    % "2.0.0-alpha0",
  "io.monix"              %% "minitest"       % "2.5.0" % "test",
  scalaOrganization.value % "scala-reflect"   % scalaVersion.value
)

It looks like there are quite a lot of them and I'm not sure if they are GraalVM friendly. But compiling to native should in theory work for any dependency that doesn't depend on JNA. For example, nuprocess should probably be replaced by https://github.com/zeroturnaround/zt-exec.

This is not a blocker, but I think it would be cool 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions