Installation
To use Vert.x for Scala, add the following dependency to the dependencies section of your build descriptor:
sbt
libraryDependencies += "io.vertx" % "vertx-core" % "4.5.11-SNAPSHOT"
libraryDependencies += "io.vertx" %% "vertx-lang-scala" % "4.5.11-SNAPSHOT"
Gradle
implementation "io.vertx:vertx-core:4.5.11-SNAPSHOT"
implementation "io.vertx:vertx-lang-scala_3:4.5.11-SNAPSHOT"
Maven
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>4.5.11-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-lang-scala_3</artifactId>
<version>4.5.11-SNAPSHOT</version>
</dependency>
What is in the package?
As of now, Vert.x for Scala provides
- implicit conversions between Vert.x Futures/Promises and Scala Futures/Promises
- a base class for Verticle implementations, io.vertx.lang.scala.ScalaVerticle
- an ExecutionContext that is
given
by anyScalaVerticle
- the io.vertx.lang.scala.json.Json object which provides some useful smart constructors and functions
- and generated
apply
methods for most of Vert.x' Data Objects
At the moment, Vert.x for Scala does not provide generated APIs for Vert.x core
or any other module. This is something that is up for the future.
In this article