nandi/jolt-nativepublic Fork 0
5ae197f7be55bd41678978f11e41a4282ffcf4b7
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

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

justfile · 54 lines · 1.9 KBMakefile Blame HistoryRaw
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago1set shell := ["bash", "-euo", "pipefail", "-c"]
2
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago3# Everything below assumes the flake's environment — `nix develop`, or direnv
4# with `use flake`. That is where the compiler, the C toolchain, PipeWire's
5# headers and the kernel headers bindgen wants come from; a bare shell has none
6# of them, and the recipes deliberately do not paper over that.
7#
8# The nix outputs are the other half of this file. `just build` is the edit
9# loop; `nix build` is the artifact.
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago10
11default:
12 @just --list
13
14# The shared objects, ready to be put on a loader search path.
15build *args:
16 cargo build --release {{args}}
17
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago18# The same three objects, built by nix instead of by the ambient cargo — pinned
19# compiler, pinned crate graph, byte-identical between machines. This is what
20# `just buck-build` used to be, minus the second dependency graph.
21nix-build:
22 nix build .#libs
23 @echo "{{justfile_directory()}}/result/lib"
Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago24
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago25# Both objects, cross-compiled for a 64-bit Android device. The NDK comes from
26# the flake, so the only thing a machine needs installed for this is nix.
Build both objects under buck2, against the BuildBuddy cache 600f207 nandi 19d ago27#
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago28# The camera needs two things from the APK that this recipe cannot supply: a
29# `CameraCapture` class in its classes.dex (frq has one), and a call to
30# joltmoq_android_init. See android/jolt_main.c.
Build libvidya for the phone, and hold the glue that boots it d942053 nandi 19d ago31ffi-android:
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago32 nix build .#android
33 @echo "{{justfile_directory()}}/result/lib/arm64-v8a"
Build libvidya for the phone, and hold the glue that boots it d942053 nandi 19d ago34
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago35# Where a consumer points LD_LIBRARY_PATH.
36libdir:
37 @echo "{{justfile_directory()}}/target/release"
Build libvidya for the phone, and hold the glue that boots it d942053 nandi 19d ago38
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago39test *args:
40 cargo test --workspace {{args}}
41
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago42# Without cpal's PipeWire host — device *names* get worse (ALSA PCMs only),
43# everything else is equal. Kept for a machine outside the flake that has
44# neither pkg-config nor PipeWire's headers.
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago45test-minimal:
46 cargo test --workspace --no-default-features
47
48lint:
49 cargo clippy --workspace --all-targets -- -D warnings
50 cargo fmt --all --check
51
Pin the toolchain with a flake, and let buck2 and DotSlash go 5ae197f nandi 13d ago52# Everything CI runs, in one go: fmt, clippy, tests and all three objects.
53check:
54 nix flake check