Repository navigation
Expand file tree
/
Copy pathlakefile.lean
More file actions
49 lines (39 loc) · 1.75 KB
/
Copy pathlakefile.lean
File metadata and controls
49 lines (39 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import Lake
open System Lake DSL
-- `lun` links linen's native code (TLS for its HTTP client, OpenSSL's
-- SHA-256) but none of its pkg-config libraries (no Postgres), so unlike
-- `liaison` it needs no extra link arguments: Lean's toolchain links OpenSSL
-- statically into every executable already.
-- System.Worker is supplied by the immutable, coordinated Linen release.
require linen from git "https://github.com/typednotes/linen" @ "v1.12.0"
-- For `Liaison.Wire` only: liaison's wire format (`POST /v0/egress`), the
-- module liaison's own server parses with. It is pure and imports none of
-- liaison's HMAC, Postgres or egress code, so it adds no link arguments.
require liaison from git "https://github.com/typednotes/liaison" @ "v0.6.0"
package lun where
version := v!"0.4.2"
testDriver := "LunTest"
-- The driver runtime, embedded in `Lun.Driver` with `include_str`. Lake does
-- not see through `include_str`, so without this `needs` an edited runtime
-- would leave the embedded copy stale.
input_file driverRuntime where
path := "template/LunDriver/Runtime.lean"
text := true
input_file driverTemporary where
path := "template/LunDriver/temporary.py"
text := true
@[default_target]
lean_lib Lun where
needs := #[driverRuntime, driverTemporary]
-- Named `LunTest` (module tree `LunTest.*`), the `{Package}Test` convention
-- of mathlib, batteries and aesop, and the package's `testDriver` (`lake test`).
lean_lib LunTest where
precompileModules := true
@[default_target]
lean_exe lun where
root := `Main
-- `Examples/Client.lean`: lun from a client's side (build a project, register
-- a graph with caller-owned state, update its inputs). `Examples/run.sh` runs it against
-- a local lun.
lean_exe «lun-example» where
root := `Examples.Client