You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/2024/12-16-rust-feature-debugging/index.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
+++
2
2
title = "Rust crate feature debugging"
3
-
date = 2024-12-12
3
+
date = 2024-12-16
4
4
[extra]
5
5
tags=["rust","bevy","cargo"]
6
-
hidden = true
7
6
custom_summary = "Figure out what enabled a feature in a crate in your dependencies breaking your build."
8
7
+++
9
8
@@ -21,9 +20,9 @@ cargo:warning= | ^~~~~~~~~~
21
20
cargo:warning=1 error generated.
22
21
```
23
22
24
-
So it looks like some crate is trying to build C-code under the hood which depends on `stdlib.h`. That is not a problem on native build targets but it won't fly on **wasm**.
23
+
So it looks like some crate is trying to build C-code under the hood which depends on `stdlib.h`. While this is not a problem on native build targets, it will not work on **Wasm**.
25
24
26
-
This happens in the `basis-universal` crate, what could that be good for? Reading up on it's [crates.io page](https://crates.io/crates/basis-universal) we find out that it is:
25
+
The code in question belongs to the `basis-universal` crate, what could that be good for? Reading up on it's [crates.io page](https://crates.io/crates/basis-universal) we find out that it is:
27
26
28
27
> Bindings for Binomial LLC's basis-universal Supercompressed GPU Texture Codec
29
28
@@ -39,7 +38,7 @@ Let's find the cause for this.
39
38
40
39
We first want to find out where in our tree of dependencies this one is used. `cargo tree` is the tool to help you analyze your dependencies as the graph structure they make up.
41
40
42
-
When running `cargo tree` we get over 1.000 lines of output where we can search for `basis-universal`:
41
+
When running `cargo tree`, we get over 1.000 outputted lines that we have to search, for somewhere inside this haystack is`basis-universal`:
<p>So it looks like some crate is trying to build C-code under the hood which depends on <code>stdlib.h</code>. That is not a problem on native build targets but it won't fly on <strong>wasm</strong>.</p>
44
-
<p>This happens in the <code>basis-universal</code> crate, what could that be good for? Reading up on it's <ahref="https://crates.io/crates/basis-universal">crates.io page</a> we find out that it is:</p>
41
+
<p>So it looks like some crate is trying to build C-code under the hood which depends on <code>stdlib.h</code>. While this is not a problem on native build targets, it will not work on <strong>Wasm</strong>.</p>
42
+
<p>The code in question belongs to the <code>basis-universal</code> crate, what could that be good for? Reading up on it's <ahref="https://crates.io/crates/basis-universal">crates.io page</a> we find out that it is:</p>
45
43
<blockquote>
46
44
<p>Bindings for Binomial LLC's basis-universal Supercompressed GPU Texture Codec</p>
<h1id="how-to-find-the-cause">How to find the cause</h1>
53
51
<p>We first want to find out where in our tree of dependencies this one is used. <code>cargo tree</code> is the tool to help you analyze your dependencies as the graph structure they make up.</p>
54
-
<p>When running <code>cargo tree</code> we get over 1.000 lines of output where we can search for <code>basis-universal</code>:</p>
52
+
<p>When running <code>cargo tree</code>, we get over 1.000 outputted lines that we have to search, for somewhere inside this haystack is<code>basis-universal</code>:</p>
0 commit comments