<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation on cargo-feature-combinations</title><link>https://romnn.github.io/cargo-feature-combinations/docs/</link><description>Recent content in Documentation on cargo-feature-combinations</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://romnn.github.io/cargo-feature-combinations/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://romnn.github.io/cargo-feature-combinations/docs/introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/cargo-feature-combinations/docs/introduction/</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;cargo-feature-combinations&lt;/code&gt; is a plugin for &lt;code&gt;cargo&lt;/code&gt; that runs a command against selected — or all — combinations of a crate&amp;rsquo;s features. You invoke it as &lt;strong&gt;&lt;code&gt;cargo fc&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The problem&lt;a class="anchor" href="#the-problem"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Cargo features are meant to be additive, but real crates rarely behave that way. A crate can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;compile with its &lt;code&gt;default&lt;/code&gt; features but fail with &lt;code&gt;--no-default-features&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;compile with each feature alone but fail when two are enabled together,&lt;/li&gt;
&lt;li&gt;pass &lt;code&gt;cargo build&lt;/code&gt; yet fail &lt;code&gt;cargo test&lt;/code&gt; for a particular combination,&lt;/li&gt;
&lt;li&gt;compile on your host but not when cross-compiled.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Checking only the default set, or only &lt;code&gt;--all-features&lt;/code&gt;, hides every one of these cases. &lt;code&gt;--all-features&lt;/code&gt; in particular enables everything at once, which is exactly the combination least likely to expose a conflict between two mutually-exclusive features.&lt;/p&gt;</description></item><item><title>Installation</title><link>https://romnn.github.io/cargo-feature-combinations/docs/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/cargo-feature-combinations/docs/installation/</guid><description>&lt;h1 id="installation"&gt;Installation&lt;a class="anchor" href="#installation"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;cargo-feature-combinations&lt;/code&gt; installs a &lt;code&gt;cargo&lt;/code&gt; subcommand. Once it&amp;rsquo;s on your &lt;code&gt;PATH&lt;/code&gt;, &lt;code&gt;cargo fc&lt;/code&gt; works from any crate or workspace.&lt;/p&gt;
&lt;h2 id="from-cratesio"&gt;From crates.io&lt;a class="anchor" href="#from-cratesio"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cargo install --locked cargo-feature-combinations&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--locked&lt;/code&gt; builds against the versions in the published &lt;code&gt;Cargo.lock&lt;/code&gt;, which is the most reproducible option.&lt;/p&gt;
&lt;h2 id="homebrew"&gt;Homebrew&lt;a class="anchor" href="#homebrew"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A prebuilt binary is available through the author&amp;rsquo;s tap, which avoids compiling from source:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install --cask romnn/tap/cargo-fc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="nix"&gt;Nix&lt;a class="anchor" href="#nix"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There is an &lt;strong&gt;unofficial&lt;/strong&gt;, community-maintained package (not maintained by the author of the tool):&lt;/p&gt;</description></item><item><title>Quick start</title><link>https://romnn.github.io/cargo-feature-combinations/docs/quick-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/cargo-feature-combinations/docs/quick-start/</guid><description>&lt;h1 id="quick-start"&gt;Quick start&lt;a class="anchor" href="#quick-start"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This walks through a first run and how to read the output. It assumes &lt;code&gt;cargo fc&lt;/code&gt; is &lt;a href="https://romnn.github.io/cargo-feature-combinations/docs/installation/"&gt;installed&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="1-run-a-command-across-the-matrix"&gt;1. Run a command across the matrix&lt;a class="anchor" href="#1-run-a-command-across-the-matrix"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;From any crate or workspace, prefix a cargo command with &lt;code&gt;fc&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cargo &lt;span class="nb"&gt;fc&lt;/span&gt; check&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;cargo fc&lt;/code&gt; enumerates the combinations of your features, runs &lt;code&gt;cargo check&lt;/code&gt; against each, and prints a summary:&lt;/p&gt;
&lt;div class="cfc-term"&gt;&lt;pre class="cfc-term__body"&gt;&lt;span class="term-fg32 term-fg1"&gt;$&lt;/span&gt; cargo fc --summary-only check --workspace
&amp;nbsp;
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[1&amp;#47;6]&lt;/span&gt; cli ( features = [] )
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[2&amp;#47;6]&lt;/span&gt; cli ( features = [color] )
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[3&amp;#47;6]&lt;/span&gt; engine ( features = [] )
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[4&amp;#47;6]&lt;/span&gt; engine ( features = [metrics] )
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[5&amp;#47;6]&lt;/span&gt; engine ( features = [metrics, tracing] )
&lt;span class="term-fg36 term-fg1"&gt; Checking &lt;/span&gt;&lt;span class="term-fg2"&gt;[6&amp;#47;6]&lt;/span&gt; engine ( features = [tracing] )
&amp;nbsp;
&lt;span class="term-fg36 term-fg1"&gt; Finished &lt;/span&gt;6 feature combinations for 2 packages in 0.00s
&amp;nbsp;
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;cli ( 0 errors, 0 warnings, features = [] )
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;cli ( 0 errors, 0 warnings, features = [color] )
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;engine ( 0 errors, 0 warnings, features = [] )
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;engine ( 0 errors, 0 warnings, features = [metrics] )
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;engine ( 0 errors, 0 warnings, features = [metrics, tracing] )
&lt;span class="term-fg32 term-fg1"&gt; PASS &lt;/span&gt;engine ( 0 errors, 0 warnings, features = [tracing] )&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Each row is one combination: the package, whether it passed, its error/warning counts, and the exact feature set. A non-zero exit status means at least one combination failed.&lt;/p&gt;</description></item><item><title>FAQ &amp; troubleshooting</title><link>https://romnn.github.io/cargo-feature-combinations/docs/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/cargo-feature-combinations/docs/faq/</guid><description>&lt;h1 id="faq--troubleshooting"&gt;FAQ &amp;amp; troubleshooting&lt;a class="anchor" href="#faq--troubleshooting"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="how-is-this-different-from---all-features"&gt;How is this different from &lt;code&gt;--all-features&lt;/code&gt;?&lt;a class="anchor" href="#how-is-this-different-from---all-features"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;--all-features&lt;/code&gt; enables every feature at once — a single configuration. &lt;code&gt;cargo fc&lt;/code&gt; runs &lt;em&gt;many&lt;/em&gt; configurations: the combinations of your features. That&amp;rsquo;s what catches a conflict between two features that each work alone but not together, or a crate that breaks with &lt;code&gt;--no-default-features&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="how-is-this-different-from-cargo-all-features"&gt;How is this different from &lt;code&gt;cargo-all-features&lt;/code&gt;?&lt;a class="anchor" href="#how-is-this-different-from-cargo-all-features"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Both explore feature combinations. &lt;code&gt;cargo fc&lt;/code&gt; adds a single readable summary, diagnostics de-duplication, automatic pruning of redundant combinations, a JSON &lt;code&gt;matrix&lt;/code&gt; for CI, per-target and per-command configuration, and driver-based cross-compilation. The &lt;code&gt;skip_optional_dependencies&lt;/code&gt; behavior is intentionally compatible.&lt;/p&gt;</description></item></channel></rss>