Skip to content

Commit

Permalink
KRZ-174 Remove ZIO Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
nob13 committed Feb 16, 2024
1 parent 2034e3c commit 0ad3e8f
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 999 deletions.
8 changes: 1 addition & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It is built upon:
- [Scala DOM](https://scala-js.github.io/scala-js-dom/)
- [ScalaTags](https://github.com/com-lihaoyi/scalatags) (optional)
- [UPickle](https://github.com/com-lihaoyi/upickle) (optional)
- [ZIO](https://zio.dev/) (optional)
- [ZIO](https://zio.dev/) (optional, example server)

Please note, this is beta software and some parts may have been hastily written.

Expand Down Expand Up @@ -54,9 +54,7 @@ For simplification, there is a `SimpleComponentBase`, which makes it easier to i
- `miniserver`: A simple ZIO-ZHTTP-based server for starting the example application.
- `engine-common`: Contains common engine code.
- `engine-naive`: Contains the naive rendering engine.
- `engine-zio`: A ZIO-based rendering engine.
- `runner`: Wraps the naive engine with examples.
- `runner-zio`: Wraps the ZIO engine with examples.

# How to

Expand All @@ -69,10 +67,6 @@ For simplification, there is a `SimpleComponentBase`, which makes it easier to i
```
runner/run serve
```
- Start the Examples (ZIO Engine)
```
runnerZio/run serve
```

- Watching for changes

Expand Down
52 changes: 0 additions & 52 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,6 @@ lazy val engineNaive = (project in file("engine-naive"))
publishSettings
)

/** ZIO Based Engine (slower, bigger size, cleaner) */
lazy val engineZio = (project in file("engine-zio"))
.enablePlugins(ScalaJSPlugin)
.dependsOn(lib.js, engineCommon.js)
.settings(
name := "kreuzberg-engine-zio",
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"org.scala-js" %%% "scalajs-dom" % scalaJsDomVersion,
"io.github.cquiroz" %%% "scala-java-time" % scalaJsJavaTimeVersion,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJsJavaTimeVersion
),
testSettings,
publishSettings
)

lazy val xml = (crossProject(JSPlatform, JVMPlatform, NativePlatform) in file("xml"))
.settings(
name := "kreuzberg-xml",
Expand Down Expand Up @@ -191,27 +174,6 @@ lazy val examples = (crossProject(JSPlatform, JVMPlatform) in file("examples"))
.jsConfigure(_.dependsOn(engineNaive))
.dependsOn(lib, xml, scalatags, extras, rpc)

// ZIO Build of Examples
lazy val examplesZio = (crossProject(JSPlatform, JVMPlatform) in file("examples-zio"))
.settings(
name := "examples-zio",
publishArtifact := false,
publish / skip := true,
publishLocal := {}
)
.jsSettings(
// Moving JavaScript to a place, where we can easily find it by the server
Compile / fastOptJS / artifactPath := baseDirectory.value / "target/client_bundle/client/fast/main.js",
Compile / fullOptJS / artifactPath := baseDirectory.value / "target/client_bundle/client/opt/main.js",
scalaJSUseMainModuleInitializer := true,
Compile / mainClass := Some("kreuzberg.examples.showcasezio.Main")
)
.jvmSettings(
Compile / mainClass := Some("kreuzberg.examples.showcase.ServerMainZio")
)
.dependsOn(examples)
.jsConfigure(_.dependsOn(engineZio))

lazy val runner = (project in file("runner"))
.settings(
Compile / compile := (Compile / compile).dependsOn(examples.js / Compile / fastOptJS).value,
Expand All @@ -223,17 +185,6 @@ lazy val runner = (project in file("runner"))
)
.dependsOn(examples.jvm)

lazy val runnerZio = (project in file("runner-zio"))
.settings(
Compile / compile := (Compile / compile).dependsOn(examplesZio.js / Compile / fastOptJS).value,
Compile / run / mainClass := (examplesZio.jvm / Compile / run / mainClass).value,
reStartArgs := Seq("serve"),
publishArtifact := false,
publish / skip := true,
publishLocal := {}
)
.dependsOn(examplesZio.jvm)

lazy val root = (project in file("."))
.settings(
name := "kreuzberg-root",
Expand All @@ -245,7 +196,6 @@ lazy val root = (project in file("."))
lib.jvm,
lib.native,
engineNaive,
engineZio,
engineCommon.js,
engineCommon.jvm,
engineCommon.native,
Expand All @@ -261,8 +211,6 @@ lazy val root = (project in file("."))
miniserver,
examples.js,
examples.jvm,
examplesZio.js,
examplesZio.jvm,
rpc.js,
rpc.jvm,
rpc.native
Expand Down
178 changes: 0 additions & 178 deletions engine-zio/src/main/scala/kreuzberg/engine/ezio/Binder.scala

This file was deleted.

0 comments on commit 0ad3e8f

Please sign in to comment.