Skip to content

Commit d02db21

Browse files
authored
Support Scala Native (#503)
1 parent bd00570 commit d02db21

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ jobs:
8585
- ++2.12 zioQueryJVM
8686
- ++2.13 zioQueryJVM
8787
- ++3.3 zioQueryJVM
88-
- ++2.12 zioQueryJS
8988
- ++2.13 zioQueryJS
9089
- ++3.3 zioQueryJS
90+
- ++2.13 zioQueryNative
91+
- ++3.3 zioQueryNative
9192
steps:
9293
- name: Install libuv
9394
run: sudo apt-get update && sudo apt-get install -y libuv1-dev

.sbtopts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-J-Xms1G
2-
-J-Xmx3G
2+
-J-Xmx4G
33
-J-XX:+UseG1GC

build.sbt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ inThisBuild(
3333
ciTargetJavaVersions := List("11", "21"),
3434
ciTargetScalaVersions :=
3535
Map(
36-
(zioQueryJVM / thisProject).value.id -> allScalas,
37-
(zioQueryJS / thisProject).value.id -> allScalas
36+
(zioQueryJVM / thisProject).value.id -> allScalas,
37+
(zioQueryJS / thisProject).value.id -> List("2.13", "3.3"),
38+
(zioQueryNative / thisProject).value.id -> List("2.13", "3.3")
3839
),
3940
ciReleaseJobs :=
4041
ciReleaseJobs.value.map { job =>
@@ -64,7 +65,7 @@ lazy val root = project
6465
docs
6566
)
6667

67-
lazy val zioQuery = crossProject(JSPlatform, JVMPlatform)
68+
lazy val zioQuery = crossProject(JSPlatform, JVMPlatform, NativePlatform)
6869
.enablePlugins(BuildInfoPlugin)
6970
.in(file("zio-query"))
7071
.settings(
@@ -87,7 +88,6 @@ lazy val zioQuery = crossProject(JSPlatform, JVMPlatform)
8788
(if (scalaBinaryVersion.value == "3")
8889
Seq()
8990
else {
90-
9191
Seq(
9292
"-opt:l:method",
9393
"-opt:l:inline",
@@ -110,6 +110,12 @@ lazy val zioQueryJS = zioQuery.js
110110
}
111111
)
112112

113+
lazy val zioQueryNative = zioQuery.native
114+
.settings(
115+
scala3Settings,
116+
nativeConfig ~= { _.withMultithreading(false) }
117+
)
118+
113119
lazy val zioQueryJVM = zioQuery.jvm.settings(enableMimaSettingsJVM)
114120

115121
lazy val benchmarks = project

project/plugins.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion)
44
addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion)
55
addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion)
66

7-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
8-
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
9-
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
7+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
8+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
9+
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
10+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
1011

1112
resolvers ++= Resolver.sonatypeOssRepos("public")

0 commit comments

Comments
 (0)