Commit 6dfdb4d
Fix building with no-std
Trying to build in an no-std doesn't work.
Example with zune-jpg and x86_64-unknown-uefi:
```
> cargo build -p zune-jpeg --target x86_64-unknown-uefi --no-default-features
Compiling zune-core v0.2.13 (/home/zoid/clone/active/zune-image/zune-core)
error[E0463]: can't find crate for `std`
|
= note: the `x86_64-unknown-uefi` target may not support the standard library
= note: `std` is required by `zune_core` because it does not declare `#![no_std]`
[...]
```
This seems to be due to a bug (or expected behavior) in the cargo
worktrees: rust-lang/cargo#8366
From zune-jpeg we can't disable the default features of zune-core.
But that's no problem, since zune-jpeg already enabled the std feature
in zune-core, whenver its std feature is enabled.
With this patch, compilation succeeds:
```
> cargo build -p zune-jpeg --target x86_64-unknown-uefi --no-default-features
Compiling zune-jpeg v0.3.16 (/home/zoid/clone/active/zune-image/zune-jpeg)
warning: dropping unsupported crate type `cdylib` for target `x86_64-unknown-uefi`
warning: `zune-jpeg` (lib) generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.15s
```
Signed-off-by: Daniel Schaefer <dhs@frame.work>1 parent e9a799e commit 6dfdb4d
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | | - | |
17 | | - | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
0 commit comments