Skip to content

Add Nix logger activity bindings - #71

Open
domenkozar wants to merge 1 commit into
nixops4:mainfrom
cachix:agent/nix-bindings-logger
Open

domenkozar wants to merge 1 commit into
nixops4:mainfrom
cachix:agent/nix-bindings-logger

Conversation

@domenkozar

@domenkozar domenkozar commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • add a CXX-backed nix-bindings-logger crate
  • expose process-global log messages and scoped build activities/build-log lines
  • integrate the crate with native-input propagation and generated workspace docs

Why

Nix's C API does not expose logger emission. Code loaded into a Nix process—such as a store plugin—needs to create nix::Activity instances so build output appears in nix build -L without carrying an application-specific C++ shim.

Impact

Downstream plugins can reuse a small, process-safe Rust API for Nix logging while keeping application-specific plugin bindings separate.

Validation

  • cargo fmt --all -- --check
  • cargo test -p nix-bindings-logger with Nix 2.34
  • parsed the changed Nix modules with nix-instantiate --parse

cc @roberth

@domenkozar
domenkozar marked this pull request as ready for review August 10, 2026 22:28
@roberth

roberth commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Seems useful, but bypassing the upstream C API will be quite the can of worms.
Those C++ bits should really be done upstream.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants