| A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago | 1 | set shell := ["bash", "-euo", "pipefail", "-c"] |
| 2 | |
| Find the sibling checkouts from a worktree too cd7e9d2 nandi 19d ago | 3 | # Sibling checkouts, found relative to the *main* checkout rather than to this |
| 4 | # directory. In a git worktree they are not the same place: the justfile sits |
| Take both native libraries from one place a66d1c1 nandi 19d ago | 5 | # at .claude/worktrees/<name>, so "../jolt-native" from here would be |
| 6 | # .claude/worktrees/jolt-native, which is nothing. `--git-common-dir` is the one |
| Find the sibling checkouts from a worktree too cd7e9d2 nandi 19d ago | 7 | # thing that answers the same in a worktree as it does in the checkout it came |
| 8 | # from. |
| 9 | checkout := parent_directory(`git rev-parse --path-format=absolute --git-common-dir`) |
| Take glimmer-vidya from gitlab, so a stranger can build this 5c40e75 nandi 19d ago | 10 | |
| 11 | # jolt-native holds both shared objects. A sibling checkout wins, so anyone |
| 12 | # working on the two repos together builds what they are editing; everyone else |
| 13 | # gets a clone of the gitlab repo under .jolt-native, pinned to the same commit |
| 14 | # deps.edn takes glimmer-vidya from. |
| 15 | jolt_native_url := "https://gitlab.com/nandithebull/jolt-native.git" |
| 16 | jolt_native_sha := "70072e8e48ad396caeab6f6bd18b999cf449ec8f" |
| 17 | jolt_native := ` |
| 18 | checkout="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")" |
| 19 | if [ -d "$checkout/../jolt-native" ]; then |
| 20 | cd "$checkout/../jolt-native" && pwd |
| 21 | else |
| 22 | echo "$checkout/.jolt-native" |
| 23 | fi |
| 24 | ` |
| A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago | 25 | |
| 26 | default: |
| 27 | @just --list |
| 28 | |
| Take both native libraries from one place a66d1c1 nandi 19d ago | 29 | # Both native libraries: libvidya (the tree ABI glimmer-vidya binds) and |
| 30 | # libjoltmoq (the AV media plane). One workspace, one target directory. |
| Take glimmer-vidya from gitlab, so a stranger can build this 5c40e75 nandi 19d ago | 31 | lib: fetch |
| Calls f31ad3d nandi 19d ago | 32 | cd {{jolt_native}} && just build |
| 33 | |
| Take glimmer-vidya from gitlab, so a stranger can build this 5c40e75 nandi 19d ago | 34 | # Clone jolt-native at the pinned commit, unless it is already here — which it |
| 35 | # is whenever the sibling checkout exists, since that is what jolt_native then |
| 36 | # points at. |
| 37 | [private] |
| 38 | fetch: |
| 39 | if [ ! -d {{quote(jolt_native)}} ]; then \ |
| 40 | git clone {{jolt_native_url}} {{quote(jolt_native)}}; \ |
| 41 | cd {{quote(jolt_native)}} && git checkout --detach {{jolt_native_sha}}; \ |
| 42 | fi |
| 43 | |
| Take both native libraries from one place a66d1c1 nandi 19d ago | 44 | # The app. |
| A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago | 45 | run *args: |
| Take both native libraries from one place a66d1c1 nandi 19d ago | 46 | LD_LIBRARY_PATH="{{jolt_native}}/target/release" jolt -M:frq {{args}} |