def compile

ezx@1.11.0.0 · src/tool/run.bend:179

import ezx@1.11.0.0/src/tool/run.bend as Run
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/pkg/path.bend as P
import ezx@1.11.0.0/src/share/cap.bend as Cap

179# `bend <file> -o <out>` under the memory cap, with the checkout's library
180def compile(+lib: String, +file: String, +out: String) -> IO(Unit):
181  do IO<Unit>:
182    +on : Bool <- Cap.ok()
183    Cap.warn.err(on)
184    +g : String <- Cap.gb()
185    _mk : String <- R.exec(["mkdir", "-p", P.dir(out)])
186    +bin : String <- R.exec(Cap.argv(on, g, lib, ["bend", file, "-o", out]))
187    compile.said(R.ok(bin), Cap.why(bin, g), R.text(bin))

Uses (16)

Used by (1)