From 1e011bcd93a832865ad76258184d90f5afda0e8f Mon Sep 17 00:00:00 2001 From: atlas Date: Sun, 30 Aug 2026 04:07:56 +0200 Subject: [PATCH] hive-sh4re: state the env-var contract, not who sets it Per review: the rust code should not explain nix stuff. The original doc comment named nix modules as the setters of HIVE_ASSETS_DIR, and the previous commit here made that worse -- it replaced two stale nix paths with four accurate ones, entrenching a cross-layer explanation instead of removing it. What this crate actually depends on is the env var and the layout it points at. Who sets it belongs to the layer that sets it. --- hive-sh4re/src/assets.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hive-sh4re/src/assets.rs b/hive-sh4re/src/assets.rs index fe160f08..ab261118 100644 --- a/hive-sh4re/src/assets.rs +++ b/hive-sh4re/src/assets.rs @@ -3,11 +3,9 @@ //! (`hive-c0re`) and the in-container harness binaries so they agree //! on the lookup contract. //! -//! At runtime, the path is read from `$HIVE_ASSETS_DIR`. In nix builds -//! that env var is set to `${pkgs.hyperhive-assets}/share/hyperhive` by -//! `nix/host-modules/hive-c0re/environment.nix` (host daemon) and -//! `nix/agent-modules/default.nix` + `agent-service.nix` (containers); -//! the package itself is built by `nix/packages/assets.nix`. +//! At runtime, the path is read from `$HIVE_ASSETS_DIR`. Setting it is +//! the deployment's job; this crate's contract is only that it names a +//! directory laid out like the packaged assets. //! For `cargo run` outside nix, set it yourself: //! //! ```sh