Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 25, 2024 10:18
Show Gist options
  • Save dacr/99916e481281488aced2a53d990467a4 to your computer and use it in GitHub Desktop.
Save dacr/99916e481281488aced2a53d990467a4 to your computer and use it in GitHub Desktop.
ZIO default unsafeRun for synchronous effect execution / published by https://github.com/dacr/code-examples-manager #24858e26-80d6-443a-b78e-6e590c48e2d7/69ccc58c50910a9821ec4a5bb1ba3b6aac26ad7e
// summary : ZIO default unsafeRun for synchronous effect execution
// keywords : scala, zio, unsafeRun
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 24858e26-80d6-443a-b78e-6e590c48e2d7
// created-on : 2022-06-25T23:48:21+02:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.4.2"
//> using dep "dev.zio::zio:2.0.13"
// ---------------------
import zio.*
val app = Console.printLine("Hello world !")
Unsafe.unsafe(implicit u => Runtime.default.unsafe.run(app))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment