nix build .#crabidy-server-aarch64 and .#crabidy have both been broken
since Opus decoding landed: symphonia-adapter-libopus pulls opusic-sys,
which compiles a bundled libopus with CMake. devenv.nix got cmake at the
time, flake.nix never did, so the derivation died with "is `cmake` not
installed?" while building the deps.
Both flake derivations now carry pkgs.cmake, and so do the three cross
Dockerfiles, which had the identical gap. No ninja anywhere: its mere
presence flips cmake's generator and then clashes with a build dir cached
under the other one.
Verified: nix build .#crabidy-server-aarch64 completes, and its output is
a 39 MB statically linked aarch64 ELF with every provider, the embedded
wasm bundle, and the Opus decoder.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
flake.nix first: its native package passed a bare --no-default-features,
which used to mean "everything but web-ui" and now means *no providers
at all*. It names its set explicitly
(all-providers,opus,spectrum,notifications); the aarch64 cross build
keeps the full defaults and its staged wasm bundle.
docs/src/build-features.md: the feature table with what each one costs to
lose, why fs takes /crabidy, /orphans, queue persistence and scan with
it, the opus/libopus build note, two worked examples, what is
deliberately not gated, and check-features. Linked from SUMMARY.md, and
config.md now says the providers list can only offer what the binary was
built with. README gains a short pointer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The static aarch64 crabidy-server now ships the browser UI. crane builds
the cbd-web wasm bundle with trunk, then stages it into the server's
`web-ui` feature (build.rs embeds cbd-web/dist).
- webSrc: a source variant that keeps cbd-web's non-cargo assets
(index.html, style.css, Trunk.toml) that filterCargoSources drops,
minus any stale prebuilt dist/.
- wasmBindgenCli: nixpkgs ships an older wasm-bindgen CLI and the dev
shell lets trunk download the matching one at build time, which a
sealed Nix build can't do — so pin an overridden CLI at 0.2.126 to
match the wasm-bindgen crate.
- webBundle: buildTrunkPackage over a wasm32 toolchain; build from
inside cbd-web (virtual workspace ⇒ trunk can't resolve the member
from the root) and index.html-first so trunk's optional-valued
--release doesn't swallow the positional.
- The aarch64 server drops --no-default-features (web-ui back on) and a
preBuild stages the bundle into cbd-web/dist before the crate compiles.
Verified: nix build .#crabidy-server-aarch64 produces a static aarch64
ELF whose embedded index.html carries the real hashed wasm/js assets
(not the headless placeholder). Native .#crabidy stays headless.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`flake.nix` packages the binaries with crane, no Docker:
- `nix build .#crabidy` / `nix profile install .#crabidy` — native cbd,
cbd-tui, crabidy-server for any machine with Nix; `nix run .#cbd-tui`.
- `nix build .#crabidy-server-aarch64` — a fully static aarch64 musl server
(no glibc/loader dependency), so it runs on stock Raspberry Pi OS. Nix
cross-compiles the Rust and the C deps (ALSA, aws-lc) hermetically on an
x86_64 host; the isolated derivation avoids the host-linker contamination
that plagues cross-linking in a plain devenv shell.
The source filter keeps crabidy-core's *.proto (crane would otherwise drop
it); builds are limited to the real bin crates with -p so the wasm cbd-web
crate is never built for a host/aarch64 target. Packages are headless
(--no-default-features) — the embedded web UI stays a normal cargo build.
The legacy container `cross` path (Cross.toml + *-Dockerfile) is left as-is;
the flake is the recommended cross path. README documents both.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>