Skip to content

fix(install): pass user-selected cargo features to build#4693

Closed
rareba wants to merge 1 commit intozeroclaw-labs:masterfrom
rareba:fix/4654-install-cargo-features
Closed

fix(install): pass user-selected cargo features to build#4693
rareba wants to merge 1 commit intozeroclaw-labs:masterfrom
rareba:fix/4654-install-cargo-features

Conversation

@rareba
Copy link
Copy Markdown
Contributor

@rareba rareba commented Mar 25, 2026

Summary

  • Add ZEROCLAW_CARGO_FEATURES env var support to install.sh
  • When set (e.g. ZEROCLAW_CARGO_FEATURES="channel-matrix"), the features are passed to cargo build --release --locked --features channel-matrix
  • Works correctly with the existing 32-bit ARM path that already uses --features (comma-appends)
  • Documented in the help text alongside other env vars

Usage

ZEROCLAW_CARGO_FEATURES="channel-matrix" ./install.sh

Files changed

  • install.sh — env var documentation + feature flag merging logic

Test plan

  • ZEROCLAW_CARGO_FEATURES="channel-matrix" ./install.sh builds with Matrix support
  • Without the env var, build behaves identically to before
  • On 32-bit ARM, features are correctly comma-appended to existing --features flag

Closes #4654

Add support for the ZEROCLAW_CARGO_FEATURES environment variable so
users can request additional cargo features (e.g. "channel-matrix")
when building from source.  The variable is appended to
CARGO_FEATURE_FLAGS and applies to both `cargo build` and
`cargo install` invocations.

Closes zeroclaw-labs#4654

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@singlerider
Copy link
Copy Markdown
Collaborator

#4663 covers the same ground with additional CLI flag support (--cargo-features) and feature deduplication logic. This PR can likely be superseded by #4663.

@rareba
Copy link
Copy Markdown
Contributor Author

rareba commented Mar 26, 2026

Makes sense — #4663 with CLI flag support and deduplication is more complete. Happy to defer to that PR. Thanks!

@theonlyhennygod
Copy link
Copy Markdown
Collaborator

Hey — this PR currently has failing CI checks. Could you rebase against current master and fix the failing checks so we can review and merge? Run cargo fmt --all -- --check && cargo clippy --all-targets -- -D warnings && cargo test locally before pushing. Thanks!

@rareba
Copy link
Copy Markdown
Contributor Author

rareba commented Mar 28, 2026

Closing in favor of #4663 which has broader coverage including CLI flag support and deduplication. Recommending closure.

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.

[Bug]: install.sh does not enable cargo features for channels/backends selected during onboarding

3 participants