This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const Builder = std.build.Builder; | |
const CrossTarget = std.zig.CrossTarget; | |
pub fn build(b: *Builder) !void { | |
const bindgen = b.addSystemCommand(&.{ "wit-bindgen", "c", "--autodrop-borrows", "yes", "./wit", "--out-dir", "src/bindings" }); | |
const optimize = b.standardOptimizeOption(.{ | |
.preferred_optimize_mode = .ReleaseSmall, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Fold": { | |
"value": { | |
"Input": {} | |
}, | |
"successCase": { | |
"input": { | |
"identifier": "244cdfef-1c83-4ea1-99ce-f683138ef78f" | |
}, | |
"result": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.vigoo.zioaws.sqs | |
import scala.jdk.CollectionConverters._ | |
import java.time.Instant | |
import zio.{ Chunk, ZIO } | |
import software.amazon.awssdk.core.SdkBytes | |
package object model { | |
object primitives { | |
type Binary = Chunk[Byte] | |
type BoxedInteger = Int | |
type MessageAttributeName = String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(args: List[String]): ZIO[Environment, Nothing, Int] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zio.interop.catz._ | |
Blocker[RIO[Console, ?]].use { blocker => | |
for { | |
// ... | |
_ <- console.putStrLn("Starting external process...") | |
_ <- (Process[Task]("echo", List("Hello world!")) > tempFile.toPath).start(blocker) | |
// ... | |
} yield () | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def >[F[_], To, NewOut, NewOutResult, Result <: ProcessNode[_, _, _, Redirected, _]] | |
(to: To) | |
(implicit | |
contextOf: ContextOf.Aux[PN, F], | |
target: CanBeProcessOutputTarget.Aux[F, To, NewOut, NewOutResult], | |
redirectOutput: RedirectOutput.Aux[F, PN, To, NewOut, NewOutResult, Result]): Result = { | |
redirectOutput(processNode, to) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait ContextOf[PN] { | |
type Context[_] | |
} | |
object ContextOf { | |
type Aux[PN, F[_]] = ContextOf[PN] { | |
type Context[_] = F[_] | |
} | |
def apply[PN <: ProcessNode[_, _, _, _, _], F[_]](implicit contextOf: ContextOf.Aux[PN, F]): Aux[PN, F] = contextOf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] prox/src/test/scala/io/github/vigoo/prox/ProcessSpecs.scala:95:63: diverging implicit expansion for type cats.effect.Concurrent[F] | |
[error] starting with method catsIorTConcurrent in object Concurrent | |
[error] running <- (Process[IO]("echo", List("Hello world!")) > tempFile.toPath).start(blocker) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running <- (Process[IO]("echo", List("Hello world!")) > tempFile.toPath).start(blocker) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class ProcessNodeOutputRedirect[PN <: ProcessNode[_, _, _, NotRedirected, _]](processNode: PN) { | |
def >[F[_], To, NewOut, NewOutResult, Result <: ProcessNode[_, _, _, Redirected, _]] | |
(to: To) | |
(implicit | |
target: CanBeProcessOutputTarget.Aux[F, To, NewOut, NewOutResult], | |
redirectOutput: RedirectOutput.Aux[F, PN, To, NewOut, NewOutResult, Result]): Result = { | |
redirectOutput(processNode, to) | |
} | |
} |
NewerOlder