nandi/freeqsay-nimpublic Fork 0
b248dcf49f97f0bc4ec74cdc78dfe62d9bf11257
Commits
Clone
git clone https://git.rickub.com/nandi/freeqsay-nim.git
git clone ssh://git@rickub.com/nandi/freeqsay-nim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

just install: put the static binary on PATH b248dcf · on b248dcf49f97f0bc4ec74cdc78dfe62d9bf11257 · nandi · 10h ago
justfile · 53 lines · 1.8 KBMakefile Blame HistoryRaw
 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
50
51
52
53
# freeqsay recipes. Everything here assumes nim on PATH.

bindir := env_var_or_default("PREFIX", env_var("HOME") / ".local/bin")

# Show the recipes.
default:
    @just --list

# Compile the standalone binary (optimized).
build:
    nim c -d:release -d:ssl --hints:off -o:freeqsay src/freeqsay.nim

# Compile a fully static binary → ./freeqsay-static (no glibc, no dlopen'd TLS).
static:
    # tools/nimstatic is a DotSlash file: the first run fetches the pinned
    # nimstatic release, verifies its hash and caches it.
    ./tools/nimstatic src/freeqsay.nim -o freeqsay-static -- -d:ssl

# Install the static binary as `freeqsay` (default ~/.local/bin, or `just install ~/bin`).
install dir=bindir: static
    #!/usr/bin/env bash
    set -euo pipefail
    mkdir -p "{{dir}}"
    install -m755 freeqsay-static "{{dir}}/freeqsay"
    echo "installed {{dir}}/freeqsay"
    # An install nobody can run is not an install: say so now rather than let
    # it be discovered later.
    case ":$PATH:" in
      *":{{dir}}:"*) "{{dir}}/freeqsay" did:plc:ewvi7nmzuoqusbcablsm7c4h "on your PATH" ;;
      *) echo "note: {{dir}} is not on your PATH. Add to your shell profile:"
         echo "      export PATH=\"{{dir}}:\$PATH\"" ;;
    esac

# Remove an installed freeqsay.
uninstall dir=bindir:
    rm -f "{{dir}}/freeqsay"
    @echo "removed {{dir}}/freeqsay"

# Run the test suite.
test:
    nim c -d:ssl --hints:off -r tests/test_avatar.nim

# Run from source, without an optimized build: `just run jay.bsky.team hello`.
run *args:
    nim r -d:ssl --hints:off src/freeqsay.nim {{args}}

# Screenshot the output, gapless: `just shot jay.bsky.team hello`.
shot *args:
    termshot -c -C 80 -f freeqsay.png -- nim r -d:ssl --hints:off src/freeqsay.nim {{args}}

# Remove build output and caches.
clean:
    rm -rf freeqsay freeqsay-static tests/test_avatar nimcache tests/nimcache